From c933d44f7bb908aa520250b608f85bfacfccc337 Mon Sep 17 00:00:00 2001 From: Alex Crichton Date: Mon, 9 Mar 2015 20:04:35 -0700 Subject: std: Remove #[allow] directives in sys modules These were suppressing lots of interesting warnings! Turns out there was also quite a bit of dead code. --- src/libstd/thread.rs | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) (limited to 'src/libstd/thread.rs') diff --git a/src/libstd/thread.rs b/src/libstd/thread.rs index 4c7dcc8b9eb..5c5f9f75fd9 100644 --- a/src/libstd/thread.rs +++ b/src/libstd/thread.rs @@ -281,17 +281,13 @@ impl Builder { let my_stack_top = addr as usize; let my_stack_bottom = my_stack_top - stack_size + 1024; unsafe { - stack::record_os_managed_stack_bounds(my_stack_bottom, my_stack_top); - } - match their_thread.name() { - Some(name) => unsafe { imp::set_name(name); }, - None => {} + if let Some(name) = their_thread.name() { + imp::set_name(name); + } + stack::record_os_managed_stack_bounds(my_stack_bottom, + my_stack_top); + thread_info::set(imp::guard::current(), their_thread); } - thread_info::set( - (my_stack_bottom, my_stack_top), - unsafe { imp::guard::current() }, - their_thread - ); let mut output = None; let f: Thunk<(), T> = if stdout.is_some() || stderr.is_some() { -- cgit 1.4.1-3-g733a5