about summary refs log tree commit diff
path: root/tests/ui/higher-ranked/trait-bounds/span-bug-issue-121597.rs
blob: cc8134304685c3854e28150485460783a4902f21 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#![allow(incomplete_features)]
#![feature(non_lifetime_binders)]

trait Foo: for<T> Bar<T> {}

trait Bar<T: ?Sized> {
    fn method(&self) {}
}

struct Type2;
fn needs_bar(_: *mut Type2) {}

fn main() {
    let x: &dyn Foo = &();
    //~^ ERROR the trait `Foo` is not dyn compatible

    needs_bar(x);
}