]>
git.proxmox.com Git - rustc.git/blob - tests/ui/fmt/incorrect-separator.rs
1 // Allows to track issue #75492:
2 // https://github.com/rust-lang/rust/issues/75492
7 format
!("A number: {}". iter
::once(42).next().unwrap());
8 //~^ ERROR expected `,`, found `.`
10 // Other kind of types are also checked:
12 format
!("A number: {}" / iter
::once(42).next().unwrap());
13 //~^ ERROR expected `,`, found `/`
15 format
!("A number: {}"; iter
::once(42).next().unwrap());
16 //~^ ERROR expected `,`, found `;`
18 // Note: this character is an COMBINING COMMA BELOW unicode char
19 format
!("A number: {}" ̦ iter
::once(42).next().unwrap());
20 //~^ ERROR expected `,`, found `iter`
21 //~^^ ERROR unknown start of token: \u{326}
23 // Here recovery is tested.
24 // If the `compile_error!` is emitted, then the parser is able to recover
25 // from the incorrect first separator.
26 format
!("{}". compile_error
!("fail"));
27 //~^ ERROR expected `,`, found `.`