Skip to content

Commit

Permalink
Fix some copy-paste errors
Browse files Browse the repository at this point in the history
  • Loading branch information
petrochenkov committed Jun 8, 2019
1 parent 8d02818 commit b9e0820
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions text/0000-subslice-pattern-syntax.md
Original file line number Diff line number Diff line change
Expand Up @@ -87,21 +87,21 @@ match v {
[1, subarray @ .., 3] => assert_eq!(subarray, [2]), // typeof(subarray) == [i32; 1]
[5, subarray @ ..] => has_type::<[i32; 2]>(subarray), // typeof(subarray) == [i32; 2]
[subarray @ .., 6] => has_type::<[i32, 2]>(subarray), // typeof(subarray) == [i32; 2]
[x, .., y] => has_type::<[i32, 1]>(x), // typeof(subarray) == [i32; 1]
[x, .., y] => has_type::<i32>(x),
[..] => {},
}
match v {
[1, ref subarray @ .., 3] => assert_eq!(subarray, [2]), // typeof(subarray) == &[i32; 1]
[5, ref subarray @ ..] => has_type::<&[i32; 2]>(subarray), // typeof(subarray) == &[i32; 2]
[ref subarray @ .., 6] => has_type::<&[i32, 2]>(subarray), // typeof(subarray) == &[i32; 2]
[x, .., y] => has_type::<&[i32, 1]>(x), // typeof(subarray) == &[i32; 1]
[x, .., y] => has_type::<&i32>(x),
[..] => {},
}
match &mut v {
[1, subarray @ .., 3] => assert_eq!(subarray, [2]), // typeof(subarray) == &mut [i32; 1]
[5, subarray @ ..] => has_type::<&mut [i32; 2]>(subarray), // typeof(subarray) == &mut [i32; 2]
[subarray @ .., 6] => has_type::<&mut [i32, 2]>(subarray), // typeof(subarray) == &mut [i32; 2]
[x, .., y] => has_type::<&mut [i32, 1]>(x), // typeof(subarray) == &mut [i32; 1]
[x, .., y] => has_type::<&mut i32>(x),
[..] => {},
}
```
Expand Down

0 comments on commit b9e0820

Please sign in to comment.