diff options
Diffstat (limited to 'src/test/ui/compile-fail-migration/object-lifetime-default-from-rptr-struct-error.nll.stderr')
| -rw-r--r-- | src/test/ui/compile-fail-migration/object-lifetime-default-from-rptr-struct-error.nll.stderr | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/test/ui/compile-fail-migration/object-lifetime-default-from-rptr-struct-error.nll.stderr b/src/test/ui/compile-fail-migration/object-lifetime-default-from-rptr-struct-error.nll.stderr new file mode 100644 index 00000000000..73b419d5113 --- /dev/null +++ b/src/test/ui/compile-fail-migration/object-lifetime-default-from-rptr-struct-error.nll.stderr @@ -0,0 +1,16 @@ +warning: not reporting region error due to nll + --> $DIR/object-lifetime-default-from-rptr-struct-error.rs:31:12 + | +LL | ss.t = t; //~ ERROR mismatched types + | ^ + +error: borrowed data escapes outside of function + --> $DIR/object-lifetime-default-from-rptr-struct-error.rs:31:5 + | +LL | fn c<'a>(t: &'a MyBox<Test+'a>, mut ss: SomeStruct<'a>) { + | - `t` is a reference that is only valid in the function body +LL | ss.t = t; //~ ERROR mismatched types + | ^^^^^^^^ `t` escapes the function body here + +error: aborting due to previous error + |
