]> git.lizzy.rs Git - rust.git/blob - src/test/ui/regions/regions-outlives-nominal-type-enum-type-rev.stderr
Rollup merge of #53317 - estebank:abolish-ice, r=oli-obk
[rust.git] / src / test / ui / regions / regions-outlives-nominal-type-enum-type-rev.stderr
1 error[E0491]: in type `&'a rev_variant_struct_type::Foo<&'b i32>`, reference has a longer lifetime than the data it references
2   --> $DIR/regions-outlives-nominal-type-enum-type-rev.rs:24:11
3    |
4 LL |         V(&'a Foo<&'b i32>) //~ ERROR reference has a longer lifetime
5    |           ^^^^^^^^^^^^^^^^
6    |
7 note: the pointer is valid for the lifetime 'a as defined on the enum at 23:14
8   --> $DIR/regions-outlives-nominal-type-enum-type-rev.rs:23:14
9    |
10 LL |     enum Bar<'a,'b> {
11    |              ^^
12 note: but the referenced data is only valid for the lifetime 'b as defined on the enum at 23:17
13   --> $DIR/regions-outlives-nominal-type-enum-type-rev.rs:23:17
14    |
15 LL |     enum Bar<'a,'b> {
16    |                 ^^
17
18 error: aborting due to previous error
19
20 For more information about this error, try `rustc --explain E0491`.