summaryrefslogtreecommitdiffstats
path: root/src/test/ui/rfc-2093-infer-outlives/regions-outlives-nominal-type-region.stderr
blob: 975776cddffb4cbcd4fcc73c014bb4c2e31a4995 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
error[E0491]: in type `&'a Foo<'b>`, reference has a longer lifetime than the data it references
  --> $DIR/regions-outlives-nominal-type-region.rs:17:20
   |
LL |         type Out = &'a Foo<'b>;
   |                    ^^^^^^^^^^^
   |
note: the pointer is valid for the lifetime `'a` as defined here
  --> $DIR/regions-outlives-nominal-type-region.rs:16:10
   |
LL |     impl<'a, 'b> Trait<'a, 'b> for usize {
   |          ^^
note: but the referenced data is only valid for the lifetime `'b` as defined here
  --> $DIR/regions-outlives-nominal-type-region.rs:16:14
   |
LL |     impl<'a, 'b> Trait<'a, 'b> for usize {
   |              ^^

error: aborting due to previous error

For more information about this error, try `rustc --explain E0491`.