Add clarifying comment to test.

This commit is contained in:
Mara Bos 2024-02-20 16:23:05 +01:00
parent e6d3e0cf99
commit f4caa832da

View File

@ -26,6 +26,7 @@ fn main() {
} }
}; };
let h = match temp() { let h = match temp() {
// The {} moves the value, making a new temporary.
owned_non_temporary => &{ owned_non_temporary }, owned_non_temporary => &{ owned_non_temporary },
}; };
println!("{a:?} {b:?} {c:?} {d:?} {e:?} {f:?} {g:?} {h:?}"); println!("{a:?} {b:?} {c:?} {d:?} {e:?} {f:?} {g:?} {h:?}");