diff options
| author | Mara Bos <m-ou.se@m-ou.se> | 2024-02-20 16:23:05 +0100 |
|---|---|---|
| committer | Mara Bos <m-ou.se@m-ou.se> | 2024-02-21 15:45:13 +0100 |
| commit | f4caa832dad4482ec1fa85bdbc3156c83cc948de (patch) | |
| tree | 78b9083406d1042c1d6b2671f7e676e10a1e219a | |
| parent | e6d3e0cf99dcde0dd660cea52998fa11c79f36d1 (diff) | |
| download | rust-f4caa832dad4482ec1fa85bdbc3156c83cc948de.tar.gz rust-f4caa832dad4482ec1fa85bdbc3156c83cc948de.zip | |
Add clarifying comment to test.
| -rw-r--r-- | tests/ui/lifetimes/temporary-lifetime-extension.rs | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/tests/ui/lifetimes/temporary-lifetime-extension.rs b/tests/ui/lifetimes/temporary-lifetime-extension.rs index 193ca0b4d07..1ecef2f3d04 100644 --- a/tests/ui/lifetimes/temporary-lifetime-extension.rs +++ b/tests/ui/lifetimes/temporary-lifetime-extension.rs @@ -26,6 +26,7 @@ fn main() { } }; let h = match temp() { + // The {} moves the value, making a new temporary. owned_non_temporary => &{ owned_non_temporary }, }; println!("{a:?} {b:?} {c:?} {d:?} {e:?} {f:?} {g:?} {h:?}"); |
