rust/src/test/ui/issues/issue-17740.stderr

54 lines
1.3 KiB
Plaintext
Raw Normal View History

2018-07-15 16:11:54 -05:00
error[E0308]: mismatched method receiver
2018-12-25 09:56:47 -06:00
--> $DIR/issue-17740.rs:6:18
2018-07-15 16:11:54 -05:00
|
LL | fn bar(self: &mut Foo) {
| ^^^^^^^^ lifetime mismatch
|
= note: expected type `Foo<'a>`
found type `Foo<'_>`
2018-12-25 09:56:47 -06:00
note: the anonymous lifetime #2 defined on the method body at 6:5...
--> $DIR/issue-17740.rs:6:5
2018-07-15 16:11:54 -05:00
|
LL | / fn bar(self: &mut Foo) {
2019-03-09 06:03:44 -06:00
LL | |
LL | |
LL | |
2018-07-15 16:11:54 -05:00
... |
2019-03-09 06:03:44 -06:00
LL | |
2018-07-15 16:11:54 -05:00
LL | | }
| |_____^
2018-12-25 09:56:47 -06:00
note: ...does not necessarily outlive the lifetime 'a as defined on the impl at 5:7
--> $DIR/issue-17740.rs:5:7
2018-07-15 16:11:54 -05:00
|
LL | impl <'a> Foo<'a>{
| ^^
error[E0308]: mismatched method receiver
2018-12-25 09:56:47 -06:00
--> $DIR/issue-17740.rs:6:18
2018-07-15 16:11:54 -05:00
|
LL | fn bar(self: &mut Foo) {
| ^^^^^^^^ lifetime mismatch
|
= note: expected type `Foo<'a>`
found type `Foo<'_>`
2018-12-25 09:56:47 -06:00
note: the lifetime 'a as defined on the impl at 5:7...
--> $DIR/issue-17740.rs:5:7
2018-07-15 16:11:54 -05:00
|
LL | impl <'a> Foo<'a>{
| ^^
2018-12-25 09:56:47 -06:00
note: ...does not necessarily outlive the anonymous lifetime #2 defined on the method body at 6:5
--> $DIR/issue-17740.rs:6:5
2018-07-15 16:11:54 -05:00
|
LL | / fn bar(self: &mut Foo) {
2019-03-09 06:03:44 -06:00
LL | |
LL | |
LL | |
2018-07-15 16:11:54 -05:00
... |
2019-03-09 06:03:44 -06:00
LL | |
2018-07-15 16:11:54 -05:00
LL | | }
| |_____^
error: aborting due to 2 previous errors
For more information about this error, try `rustc --explain E0308`.