about summary refs log tree commit diff
diff options
context:
space:
mode:
authorMatthias Krüger <476013+matthiaskrgr@users.noreply.github.com>2025-09-24 20:34:29 +0200
committerGitHub <noreply@github.com>2025-09-24 20:34:29 +0200
commitaf224996c6c8d288fd069efef2870fbf9409d3d2 (patch)
tree2ae7cec01ef76e7ebc426bade8dff83a8f2b965e
parent4300cd64df7b2f1bf60e7dcd2cb52ad9ed1fc63d (diff)
parentc9dc0e307ac643518ecf98373f86be5f68a197a0 (diff)
downloadrust-af224996c6c8d288fd069efef2870fbf9409d3d2.tar.gz
rust-af224996c6c8d288fd069efef2870fbf9409d3d2.zip
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
-rw-r--r--tests/ui/lifetimes/temporary-lifetime-extension-tuple-ctor.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/ui/lifetimes/temporary-lifetime-extension-tuple-ctor.rs b/tests/ui/lifetimes/temporary-lifetime-extension-tuple-ctor.rs
index bb537f855a4..7de786dff3b 100644
--- a/tests/ui/lifetimes/temporary-lifetime-extension-tuple-ctor.rs
+++ b/tests/ui/lifetimes/temporary-lifetime-extension-tuple-ctor.rs
@@ -1,4 +1,4 @@
-//@ edition:2024
+//@ reference: destructors.scope.lifetime-extension.exprs
 
 fn temp() -> String {
     String::from("Hello")
@@ -22,7 +22,7 @@ fn main() {
     let a = &temp();
     let b = Some(&temp());
     let c = Option::Some::<&String>(&temp());
-    use Option::Some as S;
+    use std::option::Option::Some as S;
     let d = S(&temp());
     let e = X(&temp());
     let f = Some(Ok::<_, ()>(std::borrow::Cow::Borrowed(if true {
@@ -31,6 +31,6 @@ fn main() {
         panic!()
     })));
     let some = Some; // Turn the ctor into a regular function.
-    let g = some(&temp()); //~ERROR temporary value dropped while borrowe
+    let g = some(&temp()); //~ERROR temporary value dropped while borrowed
     println!("{a:?} {b:?} {c:?} {d:?} {e:?} {f:?} {g:?}");
 }