Store binding mode for each instance independently

This commit is contained in:
hkalbasi 2023-10-22 23:34:27 +03:30
parent 7c11399b6b
commit 8b82ea4f51
8 changed files with 53 additions and 9 deletions

View file

@ -1159,6 +1159,20 @@ fn pattern_matching_slice() {
"#,
33213,
);
check_number(
r#"
//- minicore: slice, index, coerce_unsized, copy
const fn f(mut slice: &[u32]) -> usize {
slice = match slice {
[0, rest @ ..] | rest => rest,
};
slice.len()
}
const GOAL: usize = f(&[]) + f(&[10]) + f(&[0, 100])
+ f(&[1000, 1000, 1000]) + f(&[0, 57, 34, 46, 10000, 10000]);
"#,
10,
);
}
#[test]