We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
use compile_error as print
1 parent e94bda3 commit fbe3a47Copy full SHA for fbe3a47
compiler/rustc_driver_impl/src/lib.rs
@@ -58,11 +58,18 @@ use std::str;
58
use std::sync::OnceLock;
59
use std::time::Instant;
60
61
+#[allow(unused_macros)]
62
+macro do_not_use_print($($t:tt)*) {
63
+ std::compile_error!(
64
+ "Don't use `print` or `println` here, use `safe_print` or `safe_println` instead"
65
+ )
66
+}
67
+
68
// This import blocks the use of panicking `print` and `println` in all the code
69
// below. Please use `safe_print` and `safe_println` to avoid ICE when
70
// encountering an I/O error during print.
71
#[allow(unused_imports)]
-use std::{compile_error as print, compile_error as println};
72
+use {do_not_use_print as print, do_not_use_print as println};
73
74
pub mod args;
75
pub mod pretty;
0 commit comments