blob: c6ef8379f455cf81090e24d07187ab7f54e068ab (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
|
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
}
|