blob: 10b4781eb0494eab09387e03407bf65f57e84b82 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
//@ edition:2021
#![allow(bare_trait_objects)]
trait A: Sized {
fn f(a: A) -> A;
//~^ ERROR expected a type, found a trait
//~| ERROR expected a type, found a trait
//~| ERROR associated item referring to unboxed trait object for its own trait
}
trait B {
fn f(b: B) -> B;
//~^ ERROR expected a type, found a trait
//~| ERROR expected a type, found a trait
//~| ERROR associated item referring to unboxed trait object for its own trait
}
trait C {
fn f(&self, c: C) -> C;
//~^ ERROR expected a type, found a trait
//~| ERROR expected a type, found a trait
//~| ERROR associated item referring to unboxed trait object for its own trait
}
fn main() {}
|