about summary refs log tree commit diff
path: root/src/test/incremental/thinlto
diff options
context:
space:
mode:
authorkennytm <kennytm@gmail.com>2018-05-01 01:18:40 +0800
committerGitHub <noreply@github.com>2018-05-01 01:18:40 +0800
commitcbbdf998edc905bcf44ba212f068114b3a62f858 (patch)
treebc16a74fee61bf9eeaedb96eb2dcce767e957496 /src/test/incremental/thinlto
parent30c990b69354f9bfb1d7851da931bce2d1efe087 (diff)
parent2eb8343af18470d3c48a50c68dbaeb1887b42c37 (diff)
downloadrust-cbbdf998edc905bcf44ba212f068114b3a62f858.tar.gz
rust-cbbdf998edc905bcf44ba212f068114b3a62f858.zip
Rollup merge of #50327 - varkor:match-unused-struct-field, r=estebank
Display correct unused field suggestion for nested struct patterns

Extends https://github.com/rust-lang/rust/pull/47922 by checking more sophisticated patterns (e.g. references, slices, etc.).
Before:
```
warning: unused variable: `bar`
  --> src/main.rs:37:21
   |
37 |         &Foo::Bar { bar } => true,
   |                     ^^^ help: consider using `_bar` instead
   |
   = note: #[warn(unused_variables)] on by default
```
After:
```
warning: unused variable: `bar`
  --> src/main.rs:37:21
   |
37 |         &Foo::Bar { bar } => true,
   |                     ^^^ help: try ignoring the field: `bar: _`
   |
   = note: #[warn(unused_variables)] on by default
```

Fixes #50303.

r? @estebank
Diffstat (limited to 'src/test/incremental/thinlto')
0 files changed, 0 insertions, 0 deletions