2023-04-20 09:37:15 -05:00
|
|
|
//@compile-flags: --test
|
2022-11-04 12:33:04 -05:00
|
|
|
#![warn(clippy::print_stdout)]
|
|
|
|
#![warn(clippy::print_stderr)]
|
|
|
|
|
|
|
|
fn foo(n: u32) {
|
|
|
|
print!("{n}");
|
|
|
|
eprint!("{n}");
|
|
|
|
}
|
|
|
|
|
|
|
|
#[test]
|
|
|
|
pub fn foo1() {
|
|
|
|
print!("{}", 1);
|
|
|
|
eprint!("{}", 1);
|
|
|
|
}
|
|
|
|
|
|
|
|
#[cfg(test)]
|
|
|
|
fn foo3() {
|
|
|
|
print!("{}", 1);
|
|
|
|
eprint!("{}", 1);
|
|
|
|
}
|