]> git.lizzy.rs Git - rust.git/blob - src/test/ui/in-band-lifetimes/mismatched_trait_impl-2.stderr
Do not suggest using a const parameter when there are bounds on an unused type parameter
[rust.git] / src / test / ui / in-band-lifetimes / mismatched_trait_impl-2.stderr
1 error: `impl` item signature doesn't match `trait` item signature
2   --> $DIR/mismatched_trait_impl-2.rs:8:5
3    |
4 LL |     fn deref(&self) -> &dyn Trait {
5    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ found `fn(&'1 Struct) -> &'1 (dyn Trait + '1)`
6    |
7   ::: $SRC_DIR/core/src/ops/deref.rs:LL:COL
8    |
9 LL |     fn deref(&self) -> &Self::Target;
10    |     --------------------------------- expected `fn(&'1 Struct) -> &'1 (dyn Trait + 'static)`
11    |
12    = note: expected `fn(&'1 Struct) -> &'1 (dyn Trait + 'static)`
13               found `fn(&'1 Struct) -> &'1 (dyn Trait + '1)`
14    = help: the lifetime requirements from the `impl` do not correspond to the requirements in the `trait`
15    = help: verify the lifetime relationships in the `trait` and `impl` between the `self` argument, the other inputs and its output
16
17 error: aborting due to previous error
18