add test for nested pattern
This commit is contained in:
parent
feb8bb1273
commit
843e2ee5d5
15
tests/ui/pattern/slice-patterns-nested.rs
Normal file
15
tests/ui/pattern/slice-patterns-nested.rs
Normal file
@ -0,0 +1,15 @@
|
||||
// check-pass
|
||||
#![allow(unused_variables)]
|
||||
|
||||
struct Zeroes;
|
||||
struct Foo<T>(T);
|
||||
|
||||
impl Into<[usize; 3]> for Zeroes {
|
||||
fn into(self) -> [usize; 3] {
|
||||
[0; 3]
|
||||
}
|
||||
}
|
||||
|
||||
fn main() {
|
||||
let Foo([a, b, c]) = Foo(Zeroes.into());
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user