2023-01-08 16:48:41 -06:00
|
|
|
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);
|
2024-10-14 16:22:51 -05:00
|
|
|
//~^ ERROR invalid format string: expected `}`, found `?`
|
2023-01-08 16:48:41 -06:00
|
|
|
format!("{?;bar}");
|
2024-10-14 16:22:51 -05:00
|
|
|
//~^ ERROR invalid format string: expected `}`, found `?`
|
2023-01-08 16:48:41 -06:00
|
|
|
format!("{?:#?}", bar);
|
|
|
|
//~^ ERROR invalid format string: expected format parameter to occur after `:`
|
2024-01-07 13:39:46 -06:00
|
|
|
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 `:`
|
2023-01-08 16:48:41 -06:00
|
|
|
}
|