]> git.proxmox.com Git - rustc.git/blobdiff - src/test/ui/macros/macro-comma-behavior-rpass.rs
New upstream version 1.55.0+dfsg1
[rustc.git] / src / test / ui / macros / macro-comma-behavior-rpass.rs
index fd2c590ae5fd6eac0af7664732daf8ddd034b728..780e158fe0b8f8bf46fd1ee6d961fc06f68d5f5b 100644 (file)
 // revisions: std core
 
 // ignore-wasm32-bare compiled with panic=abort by default
-
 #![cfg_attr(core, no_std)]
 
-#[cfg(std)] use std::fmt;
-#[cfg(core)] use core::fmt;
+#[cfg(core)]
+use core::fmt;
+#[cfg(std)]
+use std::fmt;
 
 // an easy mistake in the implementation of 'assert!'
 // would cause this to say "explicit panic"
@@ -57,7 +58,7 @@ fn writeln_1arg() {
 //
 // (Example: Issue #48042)
 #[test]
-#[allow(non_fmt_panic)]
+#[allow(non_fmt_panics)]
 fn to_format_or_not_to_format() {
     // ("{}" is the easiest string to test because if this gets
     // sent to format_args!, it'll simply fail to compile.
@@ -80,13 +81,17 @@ fn to_format_or_not_to_format() {
     // format!("{}",); // see check-fail
     // format_args!("{}",); // see check-fail
 
-    if falsum() { panic!("{}",); }
+    if falsum() {
+        panic!("{}",);
+    }
 
     // print!("{}",); // see check-fail
     // println!("{}",); // see check-fail
     // unimplemented!("{}",); // see check-fail
 
-    if falsum() { unreachable!("{}",); }
+    if falsum() {
+        unreachable!("{}",);
+    }
 
     // write!(&mut stdout, "{}",); // see check-fail
     // writeln!(&mut stdout, "{}",); // see check-fail