]> git.lizzy.rs Git - rust.git/blob - src/test/ui/regions/regions-outlives-projection-container.stderr
2a698f9bff5a4314ecfe28aab3dca246ea2dd509
[rust.git] / src / test / ui / regions / regions-outlives-projection-container.stderr
1 error[E0491]: in type `&'a WithAssoc<TheType<'b>>`, reference has a longer lifetime than the data it references
2   --> $DIR/regions-outlives-projection-container.rs:50:12
3    |
4 LL |     let _: &'a WithAssoc<TheType<'b>> = loop { }; //~ ERROR reference has a longer lifetime
5    |            ^^^^^^^^^^^^^^^^^^^^^^^^^^
6    |
7 note: the pointer is valid for the lifetime 'a as defined on the function body at 44:15
8   --> $DIR/regions-outlives-projection-container.rs:44:15
9    |
10 LL | fn with_assoc<'a,'b>() {
11    |               ^^
12 note: but the referenced data is only valid for the lifetime 'b as defined on the function body at 44:18
13   --> $DIR/regions-outlives-projection-container.rs:44:18
14    |
15 LL | fn with_assoc<'a,'b>() {
16    |                  ^^
17
18 error[E0491]: in type `&'a WithoutAssoc<TheType<'b>>`, reference has a longer lifetime than the data it references
19   --> $DIR/regions-outlives-projection-container.rs:67:12
20    |
21 LL |     let _: &'a WithoutAssoc<TheType<'b>> = loop { }; //~ ERROR reference has a longer lifetime
22    |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
23    |
24 note: the pointer is valid for the lifetime 'a as defined on the function body at 63:18
25   --> $DIR/regions-outlives-projection-container.rs:63:18
26    |
27 LL | fn without_assoc<'a,'b>() {
28    |                  ^^
29 note: but the referenced data is only valid for the lifetime 'b as defined on the function body at 63:21
30   --> $DIR/regions-outlives-projection-container.rs:63:21
31    |
32 LL | fn without_assoc<'a,'b>() {
33    |                     ^^
34
35 error[E0491]: in type `&'a WithAssoc<TheType<'b>>`, reference has a longer lifetime than the data it references
36   --> $DIR/regions-outlives-projection-container.rs:75:12
37    |
38 LL |     call::<&'a WithAssoc<TheType<'b>>>();
39    |            ^^^^^^^^^^^^^^^^^^^^^^^^^^
40    |
41 note: the pointer is valid for the lifetime 'a as defined on the function body at 70:20
42   --> $DIR/regions-outlives-projection-container.rs:70:20
43    |
44 LL | fn call_with_assoc<'a,'b>() {
45    |                    ^^
46 note: but the referenced data is only valid for the lifetime 'b as defined on the function body at 70:23
47   --> $DIR/regions-outlives-projection-container.rs:70:23
48    |
49 LL | fn call_with_assoc<'a,'b>() {
50    |                       ^^
51
52 error[E0491]: in type `&'a WithoutAssoc<TheType<'b>>`, reference has a longer lifetime than the data it references
53   --> $DIR/regions-outlives-projection-container.rs:82:12
54    |
55 LL |     call::<&'a WithoutAssoc<TheType<'b>>>(); //~ ERROR reference has a longer lifetime
56    |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
57    |
58 note: the pointer is valid for the lifetime 'a as defined on the function body at 79:23
59   --> $DIR/regions-outlives-projection-container.rs:79:23
60    |
61 LL | fn call_without_assoc<'a,'b>() {
62    |                       ^^
63 note: but the referenced data is only valid for the lifetime 'b as defined on the function body at 79:26
64   --> $DIR/regions-outlives-projection-container.rs:79:26
65    |
66 LL | fn call_without_assoc<'a,'b>() {
67    |                          ^^
68
69 error: aborting due to 4 previous errors
70
71 For more information about this error, try `rustc --explain E0491`.