]> git.proxmox.com Git - rustc.git/blobdiff - src/test/ui/object-lifetime/object-lifetime-default-from-rptr-box-error.stderr
New upstream version 1.63.0+dfsg1
[rustc.git] / src / test / ui / object-lifetime / object-lifetime-default-from-rptr-box-error.stderr
index e7fab9ecefcd1322953d96b37cb426a36c10e6e2..7d6f9f39d13ed278f4bbab199300d749fd7c5acd 100644 (file)
@@ -1,18 +1,10 @@
-error[E0308]: mismatched types
-  --> $DIR/object-lifetime-default-from-rptr-box-error.rs:15:12
-   |
-LL |     ss.t = t;
-   |            ^ lifetime mismatch
-   |
-   = note: expected reference `&'a Box<(dyn Test + 'static)>`
-              found reference `&'a Box<(dyn Test + 'a)>`
-note: the lifetime `'a` as defined here...
-  --> $DIR/object-lifetime-default-from-rptr-box-error.rs:14:6
+error: lifetime may not live long enough
+  --> $DIR/object-lifetime-default-from-rptr-box-error.rs:15:5
    |
 LL | fn c<'a>(t: &'a Box<dyn Test+'a>, mut ss: SomeStruct<'a>) {
-   |      ^^
-   = note: ...does not necessarily outlive the static lifetime
+   |      -- lifetime `'a` defined here
+LL |     ss.t = t;
+   |     ^^^^^^^^ assignment requires that `'a` must outlive `'static`
 
 error: aborting due to previous error
 
-For more information about this error, try `rustc --explain E0308`.