summaryrefslogtreecommitdiffstats
path: root/tests/ui/traits/issue-72410.rs
blob: c95f1dfdca53a8ab34f6691c1508b0b0251edb4b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
// Regression test for #72410, this should be used with debug assertion enabled.

// should be fine
pub trait Foo {
    fn map()
    where
        Self: Sized,
        for<'a> &'a mut [u8]: ;
}

// should fail
pub trait Bar {
    fn map()
    where for<'a> &'a mut [dyn Bar]: ;
    //~^ ERROR: the trait `Bar` cannot be made into an object
}

fn main() {}