Skip to content

Commit 0eab70c

Browse files
authored
Unrolled build for #146959
Rollup merge of #146959 - tshepang:patch-2, r=nnethercote temporary-lifetime-extension-tuple-ctor.rs: make usable on all editions Also - add Reference id - fix typo
2 parents 15283f6 + c9dc0e3 commit 0eab70c

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

tests/ui/lifetimes/temporary-lifetime-extension-tuple-ctor.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
//@ edition:2024
1+
//@ reference: destructors.scope.lifetime-extension.exprs
22

33
fn temp() -> String {
44
String::from("Hello")
@@ -22,7 +22,7 @@ fn main() {
2222
let a = &temp();
2323
let b = Some(&temp());
2424
let c = Option::Some::<&String>(&temp());
25-
use Option::Some as S;
25+
use std::option::Option::Some as S;
2626
let d = S(&temp());
2727
let e = X(&temp());
2828
let f = Some(Ok::<_, ()>(std::borrow::Cow::Borrowed(if true {
@@ -31,6 +31,6 @@ fn main() {
3131
panic!()
3232
})));
3333
let some = Some; // Turn the ctor into a regular function.
34-
let g = some(&temp()); //~ERROR temporary value dropped while borrowe
34+
let g = some(&temp()); //~ERROR temporary value dropped while borrowed
3535
println!("{a:?} {b:?} {c:?} {d:?} {e:?} {f:?} {g:?}");
3636
}

0 commit comments

Comments
 (0)