mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-30 22:01:37 +00:00
Store binding mode for each instance independently
This commit is contained in:
parent
7c11399b6b
commit
8b82ea4f51
8 changed files with 53 additions and 9 deletions
|
@ -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]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue