]> git.proxmox.com Git - rustc.git/blame - src/test/ui/mismatched_types/issue-75361-mismatched-impl.stderr
Merge tag 'debian/1.52.1+dfsg1-1_exp2' into proxmox/buster
[rustc.git] / src / test / ui / mismatched_types / issue-75361-mismatched-impl.stderr
CommitLineData
3dfed10e
XL
1error: `impl` item signature doesn't match `trait` item signature
2 --> $DIR/issue-75361-mismatched-impl.rs:18:3
3 |
4LL | fn adjacent_edges(&self) -> Box<dyn MyTrait<Item = &Self::EdgeType>>;
1b1a35ee 5 | --------------------------------------------------------------------- expected `fn(&T) -> Box<(dyn MyTrait<Item = &_> + 'static)>`
3dfed10e
XL
6...
7LL | fn adjacent_edges(&self) -> Box<dyn MyTrait<Item = &Self::EdgeType> + '_> {
1b1a35ee 8 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ found `fn(&T) -> Box<dyn MyTrait<Item = &_>>`
3dfed10e 9 |
1b1a35ee
XL
10 = note: expected `fn(&T) -> Box<(dyn MyTrait<Item = &T> + 'static)>`
11 found `fn(&T) -> Box<dyn MyTrait<Item = &T>>`
3dfed10e
XL
12help: the lifetime requirements from the `impl` do not correspond to the requirements in the `trait`
13 --> $DIR/issue-75361-mismatched-impl.rs:12:55
14 |
15LL | fn adjacent_edges(&self) -> Box<dyn MyTrait<Item = &Self::EdgeType>>;
6a06907d 16 | ^^^^ consider borrowing this type parameter in the trait
3dfed10e
XL
17
18error: aborting due to previous error
19