Commit c4672f8
committed
Point out missing if conditional
On a case where an else conditional is missing, point this out
instead of the token immediately after the (incorrect) else block:
```
error: missing condition for `if` statemementt push fork -f
--> $DIR/issue-13483.rs:16:5
|
13 | } else if {
| ^ expected if condition here
```
instead of
```
error: expected `{`, found `else`
--> ../../src/test/ui/issue-13483.rs:14:7
|
14 | } else {
| ^^^^
```1 parent a80a873 commit c4672f8
File tree
3 files changed
+52
-4
lines changed- src
- libsyntax/parse
- test/ui
3 files changed
+52
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2130 | 2130 | | |
2131 | 2131 | | |
2132 | 2132 | | |
2133 | | - | |
| 2133 | + | |
2134 | 2134 | | |
2135 | 2135 | | |
2136 | 2136 | | |
| |||
2962 | 2962 | | |
2963 | 2963 | | |
2964 | 2964 | | |
2965 | | - | |
| 2965 | + | |
| 2966 | + | |
2966 | 2967 | | |
2967 | 2968 | | |
2968 | 2969 | | |
2969 | 2970 | | |
2970 | 2971 | | |
2971 | | - | |
| 2972 | + | |
| 2973 | + | |
| 2974 | + | |
| 2975 | + | |
| 2976 | + | |
| 2977 | + | |
| 2978 | + | |
| 2979 | + | |
| 2980 | + | |
| 2981 | + | |
| 2982 | + | |
| 2983 | + | |
2972 | 2984 | | |
2973 | 2985 | | |
2974 | 2986 | | |
| |||
3025 | 3037 | | |
3026 | 3038 | | |
3027 | 3039 | | |
3028 | | - | |
| 3040 | + | |
3029 | 3041 | | |
3030 | 3042 | | |
3031 | 3043 | | |
| |||
| 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 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
0 commit comments