Auto merge of #45283 - alexcrichton:used-mut-nodes, r=arielb1

rustc: Remove `used_mut_nodes` from `TyCtxt`

This updates the borrowck query to return a result, and this result is then used
to incrementally check for unused mutable nodes given sets of all the used
mutable nodes.

Closes #42384
This commit is contained in:
bors 2017-10-16 03:02:05 +00:00
commit fdec805d03
16 changed files with 220 additions and 124 deletions

View file

@ -14,6 +14,20 @@ warning: use of deprecated attribute `no_debug`: the `#[no_debug]` attribute was
|
= note: #[warn(deprecated)] on by default
warning: variable does not need to be mutable
--> $DIR/suggestions.rs:17:13
|
17 | let mut a = (1); // should suggest no `mut`, no parens
| ---^^
| |
| help: remove this `mut`
|
note: lint level defined here
--> $DIR/suggestions.rs:11:9
|
11 | #![warn(unused_mut)] // UI tests pass `-A unused`—see Issue #43896
| ^^^^^^^^^^
warning: denote infinite loops with `loop { ... }`
--> $DIR/suggestions.rs:16:5
|
@ -29,17 +43,3 @@ warning: denote infinite loops with `loop { ... }`
|
= note: #[warn(while_true)] on by default
warning: variable does not need to be mutable
--> $DIR/suggestions.rs:17:13
|
17 | let mut a = (1); // should suggest no `mut`, no parens
| ---^^
| |
| help: remove this `mut`
|
note: lint level defined here
--> $DIR/suggestions.rs:11:9
|
11 | #![warn(unused_mut)] // UI tests pass `-A unused`—see Issue #43896
| ^^^^^^^^^^