summary refs log tree commit diff
path: root/src/test/ui/wf/wf-static-method.stderr
blob: 93d16514a50783240f65339e48ecb3275f74b805 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
error[E0312]: lifetime of reference outlives lifetime of borrowed content...
  --> $DIR/wf-static-method.rs:17:9
   |
LL |         u
   |         ^
   |
note: ...the reference is valid for the lifetime `'a` as defined on the impl at 14:6...
  --> $DIR/wf-static-method.rs:14:6
   |
LL | impl<'a, 'b> Foo<'a, 'b, Evil<'a, 'b>> for () {
   |      ^^
note: ...but the borrowed content is only valid for the lifetime `'b` as defined on the impl at 14:10
  --> $DIR/wf-static-method.rs:14:10
   |
LL | impl<'a, 'b> Foo<'a, 'b, Evil<'a, 'b>> for () {
   |          ^^

error[E0478]: lifetime bound not satisfied
  --> $DIR/wf-static-method.rs:26:18
   |
LL |         let me = Self::make_me();
   |                  ^^^^^^^^^^^^^
   |
note: lifetime parameter instantiated with the lifetime `'b` as defined on the impl at 23:10
  --> $DIR/wf-static-method.rs:23:10
   |
LL | impl<'a, 'b> Foo<'a, 'b, ()> for IndirectEvil<'a, 'b> {
   |          ^^
note: but lifetime parameter must outlive the lifetime `'a` as defined on the impl at 23:6
  --> $DIR/wf-static-method.rs:23:6
   |
LL | impl<'a, 'b> Foo<'a, 'b, ()> for IndirectEvil<'a, 'b> {
   |      ^^

error[E0312]: lifetime of reference outlives lifetime of borrowed content...
  --> $DIR/wf-static-method.rs:33:9
   |
LL |         u
   |         ^
   |
note: ...the reference is valid for the lifetime `'a` as defined on the impl at 31:6...
  --> $DIR/wf-static-method.rs:31:6
   |
LL | impl<'a, 'b> Evil<'a, 'b> {
   |      ^^
note: ...but the borrowed content is only valid for the lifetime `'b` as defined on the impl at 31:10
  --> $DIR/wf-static-method.rs:31:10
   |
LL | impl<'a, 'b> Evil<'a, 'b> {
   |          ^^

error[E0495]: cannot infer an appropriate lifetime for lifetime parameter `'b` due to conflicting requirements
  --> $DIR/wf-static-method.rs:41:5
   |
LL |     <()>::static_evil(b)
   |     ^^^^^^^^^^^^^^^^^
   |
note: first, the lifetime cannot outlive the lifetime `'b` as defined on the function body at 40:13...
  --> $DIR/wf-static-method.rs:40:13
   |
LL | fn evil<'a, 'b>(b: &'b u32) -> &'a u32 {
   |             ^^
note: ...so that reference does not outlive borrowed content
  --> $DIR/wf-static-method.rs:41:23
   |
LL |     <()>::static_evil(b)
   |                       ^
note: but, the lifetime must be valid for the lifetime `'a` as defined on the function body at 40:9...
  --> $DIR/wf-static-method.rs:40:9
   |
LL | fn evil<'a, 'b>(b: &'b u32) -> &'a u32 {
   |         ^^
note: ...so that reference does not outlive borrowed content
  --> $DIR/wf-static-method.rs:41:5
   |
LL |     <()>::static_evil(b)
   |     ^^^^^^^^^^^^^^^^^^^^

error[E0495]: cannot infer an appropriate lifetime for lifetime parameter `'b` due to conflicting requirements
  --> $DIR/wf-static-method.rs:45:5
   |
LL |     <IndirectEvil>::static_evil(b)
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^
   |
note: first, the lifetime cannot outlive the lifetime `'b` as defined on the function body at 44:22...
  --> $DIR/wf-static-method.rs:44:22
   |
LL | fn indirect_evil<'a, 'b>(b: &'b u32) -> &'a u32 {
   |                      ^^
note: ...so that reference does not outlive borrowed content
  --> $DIR/wf-static-method.rs:45:33
   |
LL |     <IndirectEvil>::static_evil(b)
   |                                 ^
note: but, the lifetime must be valid for the lifetime `'a` as defined on the function body at 44:18...
  --> $DIR/wf-static-method.rs:44:18
   |
LL | fn indirect_evil<'a, 'b>(b: &'b u32) -> &'a u32 {
   |                  ^^
note: ...so that reference does not outlive borrowed content
  --> $DIR/wf-static-method.rs:45:5
   |
LL |     <IndirectEvil>::static_evil(b)
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

error: aborting due to 5 previous errors

Some errors have detailed explanations: E0312, E0478, E0495.
For more information about an error, try `rustc --explain E0312`.