Skip to content

Commit 8a12ac0

Browse files
committed
Fmt and address comment
1 parent 25b1278 commit 8a12ac0

File tree

4 files changed

+16
-6
lines changed

4 files changed

+16
-6
lines changed

src/librustc_codegen_ssa/back/linker.rs

+10-3
Original file line numberDiff line numberDiff line change
@@ -156,8 +156,9 @@ impl<'a> GccLinker<'a> {
156156
// * On OSX they have their own linker, not binutils'
157157
// * For WebAssembly/JS the only functional linker is LLD, which doesn't
158158
// support hint flags
159-
!self.sess.target.target.options.is_like_osx && self.sess.target.target.arch != "wasm32" &&
160-
self.sess.target.target.arch != "asmjs"
159+
!self.sess.target.target.options.is_like_osx
160+
&& self.sess.target.target.arch != "wasm32"
161+
&& self.sess.target.target.arch != "asmjs"
161162
}
162163

163164
// Some platforms take hints about whether a library is static or dynamic.
@@ -869,7 +870,13 @@ impl<'a> Linker for EmLinker<'a> {
869870
DebugInfo::Limited => "-g3",
870871
// FIXME: wasm2js errors with -g3 and above because it does not support source maps.
871872
// See https://github.com/WebAssembly/binaryen/issues/2410
872-
DebugInfo::Full => if self.sess.target.target.arch == "asmjs" { "-g3" } else { "-g4" },
873+
DebugInfo::Full => {
874+
if self.sess.target.target.arch == "asmjs" {
875+
"-g3"
876+
} else {
877+
"-g4"
878+
}
879+
}
873880
});
874881
}
875882

src/libstd/sys/mod.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ cfg_if::cfg_if! {
4141
} else if #[cfg(target_os = "wasi")] {
4242
mod wasi;
4343
pub use self::wasi::*;
44-
} else if #[cfg(any(target_arch = "wasm32", target_arch = "asmjs"))] {
44+
} else if #[cfg(target_arch = "wasm32")] {
4545
mod wasm;
4646
pub use self::wasm::*;
4747
} else if #[cfg(all(target_vendor = "fortanix", target_env = "sgx"))] {

src/libstd/thread/mod.rs

+4-1
Original file line numberDiff line numberDiff line change
@@ -203,7 +203,10 @@ pub use self::local::fast::Key as __FastLocalKeyInner;
203203
#[doc(hidden)]
204204
pub use self::local::os::Key as __OsLocalKeyInner;
205205
#[unstable(feature = "libstd_thread_internals", issue = "none")]
206-
#[cfg(all(any(target_arch = "wasm32", target_arch = "asmjs"), not(target_feature = "atomics")))]
206+
#[cfg(all(
207+
any(target_arch = "wasm32", target_arch = "asmjs"),
208+
not(target_feature = "atomics")
209+
))]
207210
#[doc(hidden)]
208211
pub use self::local::statik::Key as __StaticLocalKeyInner;
209212

src/libtest/tests.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -188,8 +188,8 @@ fn test_should_panic_bad_message() {
188188

189189
#[test]
190190
fn test_should_panic_non_string_message_type() {
191-
use std::any::TypeId;
192191
use crate::tests::TrFailedMsg;
192+
use std::any::TypeId;
193193
fn f() {
194194
panic!(1i32);
195195
}

0 commit comments

Comments
 (0)