diff options
| author | Alex Crichton <alex@alexcrichton.com> | 2015-03-24 14:50:46 -0700 |
|---|---|---|
| committer | Alex Crichton <alex@alexcrichton.com> | 2015-03-24 14:50:46 -0700 |
| commit | a1d2e62c1f94930aaab2f9d56b3ee4f34f95369a (patch) | |
| tree | 3ed0a12ba754e76dc1af00f6a22e34a9cfd1bd88 /src/libstd | |
| parent | 6da0b9dedbc975c3d9ae973216745de9dab535d2 (diff) | |
| parent | 7e3ee02006ec53ff176fc3490ba01eb2a9c823b8 (diff) | |
| download | rust-a1d2e62c1f94930aaab2f9d56b3ee4f34f95369a.tar.gz rust-a1d2e62c1f94930aaab2f9d56b3ee4f34f95369a.zip | |
rollup merge of #23630: nrc/coerce-tidy
See notes on the first commit Closes #18601 r? @nikomatsakis cc @eddyb
Diffstat (limited to 'src/libstd')
| -rw-r--r-- | src/libstd/lib.rs | 2 | ||||
| -rw-r--r-- | src/libstd/old_io/stdio.rs | 4 | ||||
| -rw-r--r-- | src/libstd/rt/mod.rs | 2 | ||||
| -rw-r--r-- | src/libstd/sys/windows/os.rs | 2 | ||||
| -rw-r--r-- | src/libstd/thread/local.rs | 1 |
5 files changed, 7 insertions, 4 deletions
diff --git a/src/libstd/lib.rs b/src/libstd/lib.rs index 90eca6168f2..cca6bb747d4 100644 --- a/src/libstd/lib.rs +++ b/src/libstd/lib.rs @@ -135,6 +135,8 @@ #![feature(no_std)] #![no_std] +#![allow(trivial_casts)] +#![allow(trivial_numeric_casts)] #![deny(missing_docs)] #[cfg(test)] extern crate test; diff --git a/src/libstd/old_io/stdio.rs b/src/libstd/old_io/stdio.rs index fd3fae641e2..90d27084911 100644 --- a/src/libstd/old_io/stdio.rs +++ b/src/libstd/old_io/stdio.rs @@ -337,10 +337,10 @@ pub fn set_stderr(_stderr: Box<Writer + Send>) -> Option<Box<Writer + Send>> { // }) // }) fn with_task_stdout<F>(f: F) where F: FnOnce(&mut Writer) -> IoResult<()> { - let mut my_stdout = LOCAL_STDOUT.with(|slot| { + let mut my_stdout: Box<Writer + Send> = LOCAL_STDOUT.with(|slot| { slot.borrow_mut().take() }).unwrap_or_else(|| { - box stdout() as Box<Writer + Send> + box stdout() }); let result = f(&mut *my_stdout); let mut var = Some(my_stdout); diff --git a/src/libstd/rt/mod.rs b/src/libstd/rt/mod.rs index 43aa4155629..497076cc6ac 100644 --- a/src/libstd/rt/mod.rs +++ b/src/libstd/rt/mod.rs @@ -68,7 +68,7 @@ fn lang_start(main: *const u8, argc: int, argv: *const *const u8) -> int { use thread::Thread; let something_around_the_top_of_the_stack = 1; - let addr = &something_around_the_top_of_the_stack as *const int; + let addr = &something_around_the_top_of_the_stack as *const _ as *const int; let my_stack_top = addr as uint; // FIXME #11359 we just assume that this thread has a stack of a diff --git a/src/libstd/sys/windows/os.rs b/src/libstd/sys/windows/os.rs index 83d06371734..167db1e8ac2 100644 --- a/src/libstd/sys/windows/os.rs +++ b/src/libstd/sys/windows/os.rs @@ -109,7 +109,7 @@ impl Iterator for Env { if *self.cur == 0 { return None } let p = &*self.cur; let mut len = 0; - while *(p as *const _).offset(len) != 0 { + while *(p as *const u16).offset(len) != 0 { len += 1; } let p = p as *const u16; diff --git a/src/libstd/thread/local.rs b/src/libstd/thread/local.rs index 1bf1b09681c..a2b824bb016 100644 --- a/src/libstd/thread/local.rs +++ b/src/libstd/thread/local.rs @@ -176,6 +176,7 @@ macro_rules! __thread_local_inner { } }; + #[allow(trivial_casts)] #[cfg(any(not(any(target_os = "macos", target_os = "linux")), target_arch = "aarch64"))] const _INIT: ::std::thread::__local::__impl::KeyInner<$t> = { ::std::thread::__local::__impl::KeyInner { |
