rust/src/libsyntax
bors aba93c6b60 auto merge of #5966 : alexcrichton/rust/issue-3083, r=graydon
Closes #3083.

This takes a similar approach to #5797 where a set is present on the `tcx` of used mutable definitions. Everything is by default warned about, and analyses must explicitly add mutable definitions to this set so they're not warned about.

Most of this was pretty straightforward, although there was one caveat that I ran into when implementing it. Apparently when the old modes are used (or maybe `legacy_modes`, I'm not sure) some different code paths are taken to cause spurious warnings to be issued which shouldn't be issued. I'm not really sure how modes even worked, so I was having a lot of trouble tracking this down. I figured that because they're a legacy thing that I'd just de-mode the compiler so that the warnings wouldn't be a problem anymore (or at least for the compiler).

Other than that, the entire compiler compiles without warnings of unused mutable variables. To prevent bad warnings, #5965 should be landed (which in turn is waiting on #5963) before landing this. I figured I'd stick it out for review anyway though.
2013-04-22 15:36:51 -07:00
..
ext syntax: remove unused 'mut' variables 2013-04-20 21:03:24 -04:00
parse auto merge of #5966 : alexcrichton/rust/issue-3083, r=graydon 2013-04-22 15:36:51 -07:00
print syntax: remove unused 'mut' variables 2013-04-20 21:03:24 -04:00
util librustc: Optimize metadata::decoder::item_name. 2013-04-19 11:53:33 -07:00
abi.rs syntax: de-mode and prepare for de-modeing rustc 2013-04-19 23:21:52 -04:00
ast_map.rs syntax: de-mode and prepare for de-modeing rustc 2013-04-19 23:21:52 -04:00
ast_util.rs Rename Div operator trait to Quot and Modulo operator trait to Rem 2013-04-22 01:58:53 +10:00
ast.rs Rename Div operator trait to Quot and Modulo operator trait to Rem 2013-04-22 01:58:53 +10:00
attr.rs syntax: de-mode and prepare for de-modeing rustc 2013-04-19 23:21:52 -04:00
codemap.rs syntax: de-mode and prepare for de-modeing rustc 2013-04-19 23:21:52 -04:00
diagnostic.rs syntax: remove unused 'mut' variables 2013-04-20 21:03:24 -04:00
fold.rs path -> Path 2013-04-10 09:15:04 -07:00
opt_vec.rs syntax: de-mode and prepare for de-modeing rustc 2013-04-19 23:21:52 -04:00
syntax.rc syntax: de-mode and prepare for de-modeing rustc 2013-04-19 23:21:52 -04:00
visit.rs syntax: de-mode and prepare for de-modeing rustc 2013-04-19 23:21:52 -04:00