-
Notifications
You must be signed in to change notification settings - Fork 13.8k
Commit 77e5bbf
authored
Rollup merge of #127889 - estebank:anon-arg-sugg, r=compiler-errors
More accurate span for anonymous argument suggestion
Use smaller span for suggesting adding `_:` ahead of a type:
```
error: expected one of `(`, `...`, `..=`, `..`, `::`, `:`, `{`, or `|`, found `)`
--> $DIR/anon-params-denied-2018.rs:12:47
|
LL | fn foo_with_qualified_path(<Bar as T>::Baz);
| ^ expected one of 8 possible tokens
|
= note: anonymous parameters are removed in the 2018 edition (see RFC 1685)
help: explicitly ignore the parameter name
|
LL | fn foo_with_qualified_path(_: <Bar as T>::Baz);
| ++
```File tree
2 files changed
+10
-10
lines changed- compiler/rustc_parse/src/parser
- tests/ui/anon-params
2 files changed
+10
-10
lines changedOriginal file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
2240 | 2240 |
| |
2241 | 2241 |
| |
2242 | 2242 |
| |
2243 | - | ||
2243 | + | ||
2244 | 2244 |
| |
2245 | - | ||
2245 | + | ||
2246 | 2246 |
| |
2247 | - | ||
2247 | + | ||
2248 | 2248 |
| |
2249 | 2249 |
| |
2250 | 2250 |
| |
| |||
2256 | 2256 |
| |
2257 | 2257 |
| |
2258 | 2258 |
| |
2259 | - | ||
2259 | + | ||
2260 | 2260 |
| |
2261 | 2261 |
| |
2262 | 2262 |
| |
| |||
2266 | 2266 |
| |
2267 | 2267 |
| |
2268 | 2268 |
| |
2269 | - | ||
2269 | + | ||
2270 | 2270 |
| |
2271 | 2271 |
| |
2272 | 2272 |
| |
2273 | 2273 |
| |
2274 | 2274 |
| |
2275 | 2275 |
| |
2276 | - | ||
2276 | + | ||
2277 | 2277 |
| |
2278 | 2278 |
| |
2279 | 2279 |
| |
|
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
48 | 48 |
| |
49 | 49 |
| |
50 | 50 |
| |
51 | - | ||
51 | + | ||
52 | 52 |
| |
53 | 53 |
| |
54 | 54 |
| |
| |||
60 | 60 |
| |
61 | 61 |
| |
62 | 62 |
| |
63 | - | ||
63 | + | ||
64 | 64 |
| |
65 | 65 |
| |
66 | 66 |
| |
| |||
72 | 72 |
| |
73 | 73 |
| |
74 | 74 |
| |
75 | - | ||
75 | + | ||
76 | 76 |
| |
77 | 77 |
| |
78 | 78 |
| |
| |||
84 | 84 |
| |
85 | 85 |
| |
86 | 86 |
| |
87 | - | ||
87 | + | ||
88 | 88 |
| |
89 | 89 |
| |
90 | 90 |
| |
|
0 commit comments