diff options
Diffstat (limited to '')
-rw-r--r-- | src/test/ui/traits/object/supertrait-lifetime-bound.stderr | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/test/ui/traits/object/supertrait-lifetime-bound.stderr b/src/test/ui/traits/object/supertrait-lifetime-bound.stderr new file mode 100644 index 000000000..ed2f86243 --- /dev/null +++ b/src/test/ui/traits/object/supertrait-lifetime-bound.stderr @@ -0,0 +1,11 @@ +error: lifetime may not live long enough + --> $DIR/supertrait-lifetime-bound.rs:10:5 + | +LL | fn test2<'a>() { + | -- lifetime `'a` defined here +... +LL | test1::<dyn Bar<&'a u32>, _>(); + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ requires that `'a` must outlive `'static` + +error: aborting due to previous error + |