rust/tests/ui/traits/issue-72410.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

19 lines
356 B
Rust
Raw Normal View History

2020-05-28 23:27:59 +00:00
// 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() {}