We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent cd8119a commit 467def3Copy full SHA for 467def3
src/destructors.md
@@ -395,7 +395,7 @@ Here are some examples where expressions have extended temporary scopes:
395
let x = &temp();
396
let x = &temp() as &dyn Send;
397
let x = (&*&temp(),);
398
-let x = { [Some { 0: &temp(), }] };
+let x = { [Some(&temp()) ] };
399
let ref x = temp();
400
let ref x = *&temp();
401
# x;
@@ -410,7 +410,7 @@ Here are some examples where expressions don't have extended temporary scopes:
410
// The temporary that stores the result of `temp()` only lives until the
411
// end of the let statement in these cases.
412
413
-let x = Some(&temp()); // ERROR
+let x = std::convert::identity(&temp()); // ERROR
414
let x = (&temp()).use_temp(); // ERROR
415
416
```
0 commit comments