X-Git-Url: https://git.lizzy.rs/?a=blobdiff_plain;f=src%2Ftest%2Fui%2Fnll%2Ftype-check-pointer-coercions.stderr;h=ccb3d33ac40647fe14f45cbfcf3a6fe4e85aa11f;hb=ac6e239b3bdc7b05b160f8431f17f53ba4d84c86;hp=39fd98f7151a000eb5f8490a71a63ad2d38ba2ef;hpb=14f55fa7498077236de62bc1b531ba15ba45a5fd;p=rust.git diff --git a/src/test/ui/nll/type-check-pointer-coercions.stderr b/src/test/ui/nll/type-check-pointer-coercions.stderr index 39fd98f7151..ccb3d33ac40 100644 --- a/src/test/ui/nll/type-check-pointer-coercions.stderr +++ b/src/test/ui/nll/type-check-pointer-coercions.stderr @@ -34,6 +34,9 @@ LL | x | ^ function was supposed to return data with lifetime `'a` but it is returning data with lifetime `'b` | = help: consider adding the following bound: `'b: 'a` + = note: requirement occurs because of a mutable pointer to &i32 + = note: mutable pointers are invariant over their type parameter + = help: see for more information about variance error: lifetime may not live long enough --> $DIR/type-check-pointer-coercions.rs:13:5 @@ -47,6 +50,9 @@ LL | x | ^ returning this value requires that `'a` must outlive `'b` | = help: consider adding the following bound: `'a: 'b` + = note: requirement occurs because of a mutable pointer to &i32 + = note: mutable pointers are invariant over their type parameter + = help: see for more information about variance help: `'b` and `'a` must be the same: replace one with the other