about summary refs log tree commit diff
path: root/compiler/rustc_pattern_analysis/src/constructor.rs
diff options
context:
space:
mode:
authorEsteban Küber <esteban@kuber.com.ar>2024-07-10 22:11:51 +0000
committerEsteban Küber <esteban@kuber.com.ar>2024-07-18 00:19:27 +0000
commitf6c4679547b405c0634a0d1938149ba748876d27 (patch)
tree180df48c2f0caa614e644f51d39780e3775d30dc /compiler/rustc_pattern_analysis/src/constructor.rs
parent032be6f7bbe091c7dfa29f115e94b9cc9bae1758 (diff)
downloadrust-f6c4679547b405c0634a0d1938149ba748876d27.tar.gz
rust-f6c4679547b405c0634a0d1938149ba748876d27.zip
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);
   |                                ++
```
Diffstat (limited to 'compiler/rustc_pattern_analysis/src/constructor.rs')
0 files changed, 0 insertions, 0 deletions