]> git.lizzy.rs Git - rust.git/blobdiff - src/libcore/hint.rs
Clean up E0207 explanation
[rust.git] / src / libcore / hint.rs
index f68a3e5a76fd74b0e5324444bb76165387847dbc..f4fb9ab1757cd28bcf147bd5f281d94173e20473 100644 (file)
@@ -64,31 +64,27 @@ pub unsafe fn unreachable_unchecked() -> ! {
 #[inline]
 #[unstable(feature = "renamed_spin_loop", issue = "55002")]
 pub fn spin_loop() {
-    #[cfg(
-        all(
-            any(target_arch = "x86", target_arch = "x86_64"),
-            target_feature = "sse2"
-        )
-    )] {
-        #[cfg(target_arch = "x86")] {
+    #[cfg(all(any(target_arch = "x86", target_arch = "x86_64"), target_feature = "sse2"))]
+    {
+        #[cfg(target_arch = "x86")]
+        {
             unsafe { crate::arch::x86::_mm_pause() };
         }
 
-        #[cfg(target_arch = "x86_64")] {
+        #[cfg(target_arch = "x86_64")]
+        {
             unsafe { crate::arch::x86_64::_mm_pause() };
         }
     }
 
-    #[cfg(
-        any(
-            target_arch = "aarch64",
-            all(target_arch = "arm", target_feature = "v6")
-        )
-    )] {
-        #[cfg(target_arch = "aarch64")] {
+    #[cfg(any(target_arch = "aarch64", all(target_arch = "arm", target_feature = "v6")))]
+    {
+        #[cfg(target_arch = "aarch64")]
+        {
             unsafe { crate::arch::aarch64::__yield() };
         }
-        #[cfg(target_arch = "arm")] {
+        #[cfg(target_arch = "arm")]
+        {
             unsafe { crate::arch::arm::__yield() };
         }
     }
@@ -113,7 +109,7 @@ pub fn spin_loop() {
 pub fn black_box<T>(dummy: T) -> T {
     // We need to "use" the argument in some way LLVM can't introspect, and on
     // targets that support it we can typically leverage inline assembly to do
-    // this. LLVM's intepretation of inline assembly is that it's, well, a black
+    // this. LLVM's interpretation of inline assembly is that it's, well, a black
     // box. This isn't the greatest implementation since it probably deoptimizes
     // more than we want, but it's so far good enough.
     unsafe {