Commit 4bb4a43
committed
auto merge of #16454 : pcwalton/rust/types-in-path-patterns, r=brson
patterns.
This breaks code like:
fn main() {
match Some("foo") {
None::<int> => {}
Some(_) => {}
}
}
Change this code to not contain a type error. For example:
fn main() {
match Some("foo") {
None::<&str> => {}
Some(_) => {}
}
}
Closes #16353.
[breaking-change]
r? @huonwFile tree
2 files changed
+27
-1
lines changed- src
- libsyntax/parse
- test/compile-fail
2 files changed
+27
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3157 | 3157 | | |
3158 | 3158 | | |
3159 | 3159 | | |
3160 | | - | |
| 3160 | + | |
| 3161 | + | |
| 3162 | + | |
| 3163 | + | |
| 3164 | + | |
| 3165 | + | |
| 3166 | + | |
| 3167 | + | |
| 3168 | + | |
| 3169 | + | |
3161 | 3170 | | |
3162 | 3171 | | |
3163 | 3172 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
0 commit comments