summaryrefslogtreecommitdiffstats
path: root/src/test/ui/suggestions/impl-trait-return-trailing-semicolon.rs
blob: cd3741356f4d0f042c1524320ff168d4012e5f62 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
trait Bar {}

impl Bar for i32 {}

struct Qux;

impl Bar for Qux {}

fn foo() -> impl Bar {
    //~^ ERROR the trait bound `(): Bar` is not satisfied
    5;
    //~^ HELP remove this semicolon
}

fn bar() -> impl Bar {
    //~^ ERROR the trait bound `(): Bar` is not satisfied
    //~| HELP the following other types implement trait `Bar`:
    "";
}

fn main() {}