mirror of
https://github.com/rust-lang/rust.git
synced 2026-04-27 18:57:42 +03:00
42 lines
808 B
Rust
42 lines
808 B
Rust
#![allow(clippy::match_single_binding, clippy::unnecessary_trailing_comma)]
|
|
|
|
fn main() {
|
|
println!();
|
|
println!();
|
|
//~^ println_empty_string
|
|
|
|
match "a" {
|
|
_ => println!(),
|
|
//~^ println_empty_string
|
|
}
|
|
|
|
eprintln!();
|
|
eprintln!();
|
|
//~^ println_empty_string
|
|
|
|
match "a" {
|
|
_ => eprintln!(),
|
|
//~^ println_empty_string
|
|
}
|
|
}
|
|
|
|
#[rustfmt::skip]
|
|
fn issue_16167() {
|
|
//~v println_empty_string
|
|
println!(
|
|
);
|
|
|
|
match "a" {
|
|
_ => println!(), // there is a space between "" and comma
|
|
//~^ println_empty_string
|
|
}
|
|
|
|
eprintln!(); // there is a tab between "" and comma
|
|
//~^ println_empty_string
|
|
|
|
match "a" {
|
|
_ => eprintln!(), // tab and space between "" and comma
|
|
//~^ println_empty_string
|
|
}
|
|
}
|