blob: d837b848591f21bdfbd0776ec7ee736b8de64cc2 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
|
trait Trait {}
trait X {
fn foo(&self) where Self: Trait;
}
impl X for () {
fn foo(&self) {}
}
impl Trait for dyn X {}
//~^ ERROR the trait `X` is not dyn compatible
pub fn main() {
// Check that this does not segfault.
<dyn X as X>::foo(&());
//~^ ERROR the trait `X` is not dyn compatible
}
|