diff options
| author | Alex Crichton <alex@alexcrichton.com> | 2015-03-09 20:04:35 -0700 |
|---|---|---|
| committer | Alex Crichton <alex@alexcrichton.com> | 2015-03-12 10:23:27 -0700 |
| commit | c933d44f7bb908aa520250b608f85bfacfccc337 (patch) | |
| tree | 82cab26f340e4cfdc5d373d621fd77713f6c6d78 /src/libstd/thread.rs | |
| parent | 206ee0e8533dd3e1ee324da445e02ad79c51e849 (diff) | |
| download | rust-c933d44f7bb908aa520250b608f85bfacfccc337.tar.gz rust-c933d44f7bb908aa520250b608f85bfacfccc337.zip | |
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.
Diffstat (limited to 'src/libstd/thread.rs')
| -rw-r--r-- | src/libstd/thread.rs | 16 |
1 files changed, 6 insertions, 10 deletions
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() { |
