rust/src/librustc
kennytm cbbdf998ed
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
2018-05-01 01:18:40 +08:00
..
benches Move deny(warnings) into rustbuild 2018-04-08 16:59:14 -06:00
cfg AST/HIR: Merge field access expressions for named and numeric fields 2018-04-12 23:02:09 +03:00
dep_graph Create a canonical trait query for evaluate_obligation 2018-04-26 20:28:29 -05:00
hir Auto merge of #50092 - abonander:issue-49934, r=petrochenkov 2018-04-30 00:18:49 +00:00
ich Track unused mutable variables across closures 2018-04-28 01:55:25 -07:00
infer Auto merge of #50240 - nnethercote:LazyBTreeMap, r=cramertj 2018-04-28 21:19:33 +00:00
lint rustc_target: move LayoutOf's type parameter to an associated type. 2018-04-26 16:50:28 +03:00
middle Correct unused field warning on struct match container patterns 2018-04-30 01:27:37 +01:00
mir Only check possibly initialized values and also loop over fn args 2018-04-28 01:55:25 -07:00
session Auto merge of #50204 - Manishearth:approx-enum, r=estebank 2018-04-30 05:38:06 +00:00
traits Rollup merge of #50257 - estebank:fix-49560, r=nikomatsakis 2018-04-28 04:51:00 +08:00
ty Auto merge of #48605 - KiChjang:unused-mut-warning, r=nikomatsakis 2018-04-29 16:25:04 +00:00
util Auto merge of #50102 - Zoxc:query-nomacro, r=michaelwoerister 2018-04-27 16:42:31 +00:00
build.rs rustc: Add some build scripts for librustc crates 2017-07-22 22:04:13 -07:00
Cargo.toml Rename rustc_back::target to rustc_target::spec. 2018-04-26 16:39:44 +03:00
diagnostics.rs Checking location and syntax of non_exhaustive attribute. 2018-04-02 23:02:29 +01:00
lib.rs Rollup merge of #49968 - christianpoveda:stabilize_dyn, r=nikomatsakis 2018-04-28 03:32:12 +08:00
macros.rs extend stable hasher to support CanonicalTy 2018-03-16 12:49:37 -04:00
README.md Change links to readmes 2018-02-25 15:24:14 -06:00

For more information about how rustc works, see the rustc guide.