rust/src/libstd
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
..
num auto merge of #5966 : alexcrichton/rust/issue-3083, r=graydon 2013-04-22 15:36:51 -07:00
arc.rs core::comm: Modernize constructors to use new 2013-04-18 14:07:35 -07:00
arena.rs Replaced many instances of reinterpret_cast with transmute 2013-04-20 22:05:50 +02:00
base64.rs Rename Div operator trait to Quot and Modulo operator trait to Rem 2013-04-22 01:58:53 +10:00
bitv.rs std: remove unused 'mut' variables 2013-04-20 21:03:24 -04:00
c_vec.rs std: clean up tests (mostly unused unsafe blocks) 2013-04-19 23:23:23 -04:00
cmp.rs librustc: Remove fail_unless! 2013-03-29 16:39:08 -07:00
comm.rs librustc: Remove fail_unless! 2013-03-29 16:39:08 -07:00
dbg.rs Replaced many instances of reinterpret_cast with transmute 2013-04-20 22:05:50 +02:00
deque.rs std: remove unused 'mut' variables 2013-04-20 21:03:24 -04:00
dlist.rs std: remove unused 'mut' variables 2013-04-20 21:03:24 -04:00
ebml.rs libstd: Micro-optimize vuint_at 2013-04-19 11:53:34 -07:00
fileinput.rs Fix fileinput test fail 2013-04-04 11:16:26 +09:00
flatpipes.rs Merge remote-tracking branch 'remotes/origin/incoming' into serial 2013-03-29 17:48:44 -07:00
fun_treemap.rs librustc: Replace all uses of fn() with &fn(). rs=defun 2013-03-11 09:35:58 -07:00
future.rs libcore,std,syntax,rustc: move tests into mod tests, make them private (no pub mod or pub fn). 2013-04-16 09:57:47 +10:00
getopts.rs libcore,std,syntax,rustc: move tests into mod tests, make them private (no pub mod or pub fn). 2013-04-16 09:57:47 +10:00
io_util.rs librustc: Remove all uses of static from functions. rs=destatic 2013-03-22 10:27:39 -07:00
json.rs syntax: add {read,emit}_enum_struct_variant{,_field} 2013-04-10 16:32:09 -07:00
list.rs libcore,std,syntax,rustc: move tests into mod tests, make them private (no pub mod or pub fn). 2013-04-16 09:57:47 +10:00
md4.rs Removing no longer needed unsafe blocks 2013-04-08 17:50:25 -04:00
net.rs Add some extra description for std::net 2013-01-01 01:02:48 -05:00
net_ip.rs core::comm: Modernize constructors to use new 2013-04-18 14:07:35 -07:00
net_tcp.rs librustc: WIP patch for using the return value. 2013-04-19 12:00:08 -07:00
net_url.rs libcore,std,syntax,rustc: move tests into mod tests, make them private (no pub mod or pub fn). 2013-04-16 09:57:47 +10:00
par.rs Replaced many instances of reinterpret_cast with transmute 2013-04-20 22:05:50 +02:00
priority_queue.rs libstd: changes to in response to #5656 2013-04-10 17:32:03 -07:00
rl.rs std: remove unused unsafe blocks/functions 2013-04-14 01:15:46 -04:00
rope.rs std: remove unused 'mut' variables 2013-04-20 21:03:24 -04:00
semver.rs librustc: Remove fail_unless! 2013-03-29 16:39:08 -07:00
serialize.rs initial iterator object library 2013-04-13 05:51:14 -04:00
sha1.rs std: remove unused 'mut' variables 2013-04-20 21:03:24 -04:00
smallintmap.rs libstd: changes to in response to #5656 2013-04-10 17:32:03 -07:00
sort.rs std: remove unused 'mut' variables 2013-04-20 21:03:24 -04:00
stats.rs librustc: Remove fail_unless! 2013-03-29 16:39:08 -07:00
std.rc Rename Div operator trait to Quot and Modulo operator trait to Rem 2013-04-22 01:58:53 +10:00
sync.rs Replaced many instances of reinterpret_cast with transmute 2013-04-20 22:05:50 +02:00
task_pool.rs Removing some mutable fields in libstd 2013-04-08 17:50:14 -04:00
tempfile.rs librustc: Remove fail_unless! 2013-03-29 16:39:08 -07:00
term.rs librustc: Remove fail_unless! 2013-03-29 16:39:08 -07:00
test.rs std: remove unused 'mut' variables 2013-04-20 21:03:24 -04:00
time.rs std: remove unused 'mut' variables 2013-04-20 21:03:24 -04:00
timer.rs core::comm: Modernize constructors to use new 2013-04-18 14:07:35 -07:00
treemap.rs iterator: use an IteratorUtil trait 2013-04-15 21:35:41 -04:00
unicode.rs librustc: Remove fail_unless! 2013-03-29 16:39:08 -07:00
uv.rs Give core::rt and std::net their own uvll bindings 2013-03-18 16:59:11 -07:00
uv_global_loop.rs core::comm: Modernize constructors to use new 2013-04-18 14:07:35 -07:00
uv_iotask.rs std: clean up tests (mostly unused unsafe blocks) 2013-04-19 23:23:23 -04:00
uv_ll.rs std: clean up tests (mostly unused unsafe blocks) 2013-04-19 23:23:23 -04:00
workcache.rs Small typos, year date and URL of the fbuild system for reference. 2013-04-18 11:51:12 +02:00