]> git.proxmox.com Git - rustc.git/blobdiff - src/test/ui/traits/associated_type_bound/check-trait-object-bounds-3.stderr
Merge tag 'debian/1.52.1+dfsg1-1_exp2' into proxmox/buster
[rustc.git] / src / test / ui / traits / associated_type_bound / check-trait-object-bounds-3.stderr
diff --git a/src/test/ui/traits/associated_type_bound/check-trait-object-bounds-3.stderr b/src/test/ui/traits/associated_type_bound/check-trait-object-bounds-3.stderr
new file mode 100644 (file)
index 0000000..ade552c
--- /dev/null
@@ -0,0 +1,15 @@
+error[E0597]: `s` does not live long enough
+  --> $DIR/check-trait-object-bounds-3.rs:15:34
+   |
+LL |         z = f::<dyn X<Y = &str>>(&s);
+   |             ---------------------^^-
+   |             |                    |
+   |             |                    borrowed value does not live long enough
+   |             argument requires that `s` is borrowed for `'static`
+LL |
+LL |     }
+   |     - `s` dropped here while still borrowed
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0597`.