review comments

This commit is contained in:
Esteban Küber 2019-12-22 17:53:50 -08:00
parent eb0f4d51df
commit 3811232190
6 changed files with 24 additions and 46 deletions

View file

@ -11,7 +11,7 @@ LL | fn deref(&self) -> &Self::Target;
|
= note: expected `fn(&Struct) -> &(dyn Trait + 'static)`
found `fn(&Struct) -> &dyn Trait`
= note: the lifetime requirements from the `trait` could not be fulfilled by the `impl`
= note: the lifetime requirements from the `trait` could not be satisfied by the `impl`
= help: verify the lifetime relationships in the `trait` and `impl` between the `self` argument, the other inputs and its output
error: aborting due to previous error

View file

@ -9,7 +9,7 @@ LL | fn foo(&self, x: &u32, y: &'a u32) -> &'a u32 {
|
= note: expected `fn(&i32, &'a u32, &u32) -> &'a u32`
found `fn(&i32, &u32, &u32) -> &u32`
= note: the lifetime requirements from the `trait` could not be fulfilled by the `impl`
= note: the lifetime requirements from the `trait` could not be satisfied by the `impl`
= help: verify the lifetime relationships in the `trait` and `impl` between the `self` argument, the other inputs and its output
error: aborting due to previous error

View file

@ -9,7 +9,7 @@ LL | fn foo(&self, x: &u32, y: &'a u32) -> &'a u32 {
|
= note: expected `fn(&i32, &'a u32, &u32) -> &'a u32`
found `fn(&i32, &u32, &u32) -> &u32`
= note: the lifetime requirements from the `trait` could not be fulfilled by the `impl`
= note: the lifetime requirements from the `trait` could not be satisfied by the `impl`
= help: verify the lifetime relationships in the `trait` and `impl` between the `self` argument, the other inputs and its output
error[E0623]: lifetime mismatch

View file

@ -9,7 +9,7 @@ LL | fn foo<'a>(x: &'a i32, y: &'a i32) -> &'a i32 {
|
= note: expected `fn(&i32, &'a i32) -> &'a i32`
found `fn(&i32, &i32) -> &i32`
= note: the lifetime requirements from the `trait` could not be fulfilled by the `impl`
= note: the lifetime requirements from the `trait` could not be satisfied by the `impl`
= help: verify the lifetime relationships in the `trait` and `impl` between the `self` argument, the other inputs and its output
error: aborting due to previous error

View file

@ -2,7 +2,7 @@ error: `impl` item signature doesn't match `trait` item signature
--> $DIR/trait-param-without-lifetime-constraint.rs:14:5
|
LL | pub trait HaveRelationship<To> {
| -- in order for `impl` items to be able to implement the method, this type parameter might need a lifetime restriction like `To: 'a`
| -- for `impl` items to implement the method, this type parameter might need a lifetime restriction like `To: 'a`
LL | fn get_relation(&self) -> To;
| ----------------------------- expected fn(&Article) -> &ProofReader
...
@ -11,7 +11,7 @@ LL | fn get_relation(&self) -> &ProofReader {
|
= note: expected `fn(&Article) -> &ProofReader`
found `fn(&Article) -> &ProofReader`
= note: the lifetime requirements from the `trait` could not be fulfilled by the `impl`
= note: the lifetime requirements from the `trait` could not be satisfied by the `impl`
= help: verify the lifetime relationships in the `trait` and `impl` between the `self` argument, the other inputs and its output
error: aborting due to previous error