Skip to content

Commit b9e0820

Browse files
committed
Fix some copy-paste errors
1 parent 8d02818 commit b9e0820

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

text/0000-subslice-pattern-syntax.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -87,21 +87,21 @@ match v {
8787
[1, subarray @ .., 3] => assert_eq!(subarray, [2]), // typeof(subarray) == [i32; 1]
8888
[5, subarray @ ..] => has_type::<[i32; 2]>(subarray), // typeof(subarray) == [i32; 2]
8989
[subarray @ .., 6] => has_type::<[i32, 2]>(subarray), // typeof(subarray) == [i32; 2]
90-
[x, .., y] => has_type::<[i32, 1]>(x), // typeof(subarray) == [i32; 1]
90+
[x, .., y] => has_type::<i32>(x),
9191
[..] => {},
9292
}
9393
match v {
9494
[1, ref subarray @ .., 3] => assert_eq!(subarray, [2]), // typeof(subarray) == &[i32; 1]
9595
[5, ref subarray @ ..] => has_type::<&[i32; 2]>(subarray), // typeof(subarray) == &[i32; 2]
9696
[ref subarray @ .., 6] => has_type::<&[i32, 2]>(subarray), // typeof(subarray) == &[i32; 2]
97-
[x, .., y] => has_type::<&[i32, 1]>(x), // typeof(subarray) == &[i32; 1]
97+
[x, .., y] => has_type::<&i32>(x),
9898
[..] => {},
9999
}
100100
match &mut v {
101101
[1, subarray @ .., 3] => assert_eq!(subarray, [2]), // typeof(subarray) == &mut [i32; 1]
102102
[5, subarray @ ..] => has_type::<&mut [i32; 2]>(subarray), // typeof(subarray) == &mut [i32; 2]
103103
[subarray @ .., 6] => has_type::<&mut [i32, 2]>(subarray), // typeof(subarray) == &mut [i32; 2]
104-
[x, .., y] => has_type::<&mut [i32, 1]>(x), // typeof(subarray) == &mut [i32; 1]
104+
[x, .., y] => has_type::<&mut i32>(x),
105105
[..] => {},
106106
}
107107
```

0 commit comments

Comments
 (0)