rust/src/test/ui/wf/wf-static-method.stderr
2021-05-21 10:16:53 -04:00

137 lines
4.7 KiB
Plaintext

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[E0495]: cannot infer an appropriate lifetime for lifetime parameter `'b` due to conflicting requirements
--> $DIR/wf-static-method.rs:50:5
|
LL | <Evil>::inherent_evil(b)
| ^^^^^^^^^^^^^^^^^^^^^
|
note: first, the lifetime cannot outlive the lifetime `'b` as defined on the function body at 49:22...
--> $DIR/wf-static-method.rs:49:22
|
LL | fn inherent_evil<'a, 'b>(b: &'b u32) -> &'a u32 {
| ^^
note: ...so that reference does not outlive borrowed content
--> $DIR/wf-static-method.rs:50:27
|
LL | <Evil>::inherent_evil(b)
| ^
note: but, the lifetime must be valid for the lifetime `'a` as defined on the function body at 49:18...
--> $DIR/wf-static-method.rs:49:18
|
LL | fn inherent_evil<'a, 'b>(b: &'b u32) -> &'a u32 {
| ^^
note: ...so that reference does not outlive borrowed content
--> $DIR/wf-static-method.rs:50:5
|
LL | <Evil>::inherent_evil(b)
| ^^^^^^^^^^^^^^^^^^^^^^^^
error: aborting due to 6 previous errors
Some errors have detailed explanations: E0312, E0478, E0495.
For more information about an error, try `rustc --explain E0312`.