]> git.lizzy.rs Git - rust.git/blob - src/test/ui/rfc-2093-infer-outlives/regions-outlives-nominal-type-type.stderr
Rollup merge of #58812 - jonhoo:floor_v_trunc, r=alexcrichton
[rust.git] / src / test / ui / rfc-2093-infer-outlives / regions-outlives-nominal-type-type.stderr
1 error[E0491]: in type `&'a variant_struct_type::Foo<&'b i32>`, reference has a longer lifetime than the data it references
2   --> $DIR/regions-outlives-nominal-type-type.rs:17:9
3    |
4 LL |         type Out = &'a Foo<&'b i32>;
5    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
6    |
7 note: the pointer is valid for the lifetime 'a as defined on the impl at 16:10
8   --> $DIR/regions-outlives-nominal-type-type.rs:16:10
9    |
10 LL |     impl<'a, 'b> Trait<'a, 'b> for usize {
11    |          ^^
12 note: but the referenced data is only valid for the lifetime 'b as defined on the impl at 16:14
13   --> $DIR/regions-outlives-nominal-type-type.rs:16:14
14    |
15 LL |     impl<'a, 'b> Trait<'a, 'b> for usize {
16    |              ^^
17
18 error: aborting due to previous error
19
20 For more information about this error, try `rustc --explain E0491`.