]> git.lizzy.rs Git - rust.git/blob - tests/ui/suggestions/impl-trait-return-trailing-semicolon.rs
Auto merge of #106399 - estebank:type-err-span-label, r=nagisa
[rust.git] / tests / ui / suggestions / impl-trait-return-trailing-semicolon.rs
1 trait Bar {}
2
3 impl Bar for i32 {}
4
5 struct Qux;
6
7 impl Bar for Qux {}
8
9 fn foo() -> impl Bar {
10     //~^ ERROR the trait bound `(): Bar` is not satisfied
11     5;
12     //~^ HELP remove this semicolon
13 }
14
15 fn bar() -> impl Bar {
16     //~^ ERROR the trait bound `(): Bar` is not satisfied
17     //~| HELP the following other types implement trait `Bar`:
18     "";
19 }
20
21 fn main() {}