diff --git a/src/libstd/sys/windows/os.rs b/src/libstd/sys/windows/os.rs index 4f6c4c9aab366..c5548ab72b2fe 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/mod.rs b/src/libstd/thread_local/mod.rs index 08780292c88b1..61ed2c5dbb991 100644 --- a/src/libstd/thread_local/mod.rs +++ b/src/libstd/thread_local/mod.rs @@ -203,6 +203,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> = { unsafe extern fn __destroy(ptr: *mut u8) { diff --git a/src/libterm/win.rs b/src/libterm/win.rs index e29e0e27394db..001313db6769f 100644 --- a/src/libterm/win.rs +++ b/src/libterm/win.rs @@ -126,7 +126,7 @@ impl WinConsole { } Some(box WinConsole { buf: out, def_foreground: fg, def_background: bg, - foreground: fg, background: bg } as Box+Send>) + foreground: fg, background: bg }) } }