Skip to content

Commit e6d3e0c

Browse files
m-ou-sedanielhenrymantilla
andauthoredFeb 20, 2024
Extend temporary lifetime extension test.
Co-authored-by: Daniel Henry-Mantilla <daniel.henry.mantilla@gmail.com>
1 parent bec765e commit e6d3e0c

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed
 

‎tests/ui/lifetimes/temporary-lifetime-extension.rs

+4-1
Original file line numberDiff line numberDiff line change
@@ -25,5 +25,8 @@ fn main() {
2525
&temp()
2626
}
2727
};
28-
println!("{a:?} {b:?} {c:?} {d:?} {e:?} {f:?} {g:?}");
28+
let h = match temp() {
29+
owned_non_temporary => &{ owned_non_temporary },
30+
};
31+
println!("{a:?} {b:?} {c:?} {d:?} {e:?} {f:?} {g:?} {h:?}");
2932
}

0 commit comments

Comments
 (0)
Please sign in to comment.