about summary refs log tree commit diff
path: root/tests/ui/traits/bound/not-on-bare-trait-2021.rs
blob: 93d2f04b54e56ba657a449f8f9e22cc7b51e310e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
//@ edition:2021
trait Foo {
    fn dummy(&self) {}
}

// This should emit the less confusing error, not the more confusing one.

fn foo(_x: Foo + Send) {
    //~^ ERROR expected a type, found a trait
}
fn bar(x: Foo) -> Foo {
    //~^ ERROR expected a type, found a trait
    //~| ERROR expected a type, found a trait
    x
}

fn main() {}