mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-23 07:14:28 +00:00
22 lines
1001 B
Rust
22 lines
1001 B
Rust
fn main() {
|
|
let bar = 3;
|
|
format!("{?:}", bar);
|
|
//~^ ERROR invalid format string: expected format parameter to occur after `:`
|
|
format!("{?:bar}");
|
|
//~^ ERROR invalid format string: expected format parameter to occur after `:`
|
|
format!("{?:?}", bar);
|
|
//~^ ERROR invalid format string: expected format parameter to occur after `:`
|
|
format!("{??}", bar);
|
|
//~^ ERROR invalid format string: expected `'}'`, found `'?'`
|
|
format!("{?;bar}");
|
|
//~^ ERROR invalid format string: expected `'}'`, found `'?'`
|
|
format!("{?:#?}", bar);
|
|
//~^ ERROR invalid format string: expected format parameter to occur after `:`
|
|
format!("Hello {<5:}!", "x");
|
|
//~^ ERROR invalid format string: expected format parameter to occur after `:`
|
|
format!("Hello {^5:}!", "x");
|
|
//~^ ERROR invalid format string: expected format parameter to occur after `:`
|
|
format!("Hello {>5:}!", "x");
|
|
//~^ ERROR invalid format string: expected format parameter to occur after `:`
|
|
}
|