rust/tests/ui/dst/issue-90528-unsizing-not-suggestion-110063.rs

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

14 lines
226 B
Rust
Raw Normal View History

trait Test {}
impl Test for &[u8] {}
fn needs_test<T: Test>() -> T {
panic!()
}
fn main() {
needs_test::<[u8; 1]>();
//~^ ERROR the trait bound
let x: [u8; 1] = needs_test();
//~^ ERROR the trait bound
}