about summary refs log tree commit diff
path: root/tests/ui/errors/span-format_args-issue-140578.rs
blob: d086fde09f7b49e654f6fa9ee28741cea5a10b8a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
fn check_format_args() {
  print!("{:?} {a} {a:?}", [], a = 1 + 1);
  //~^ ERROR type annotations needed
}

fn check_format_args_nl() {
  println!("{:?} {a} {a:?}", [], a = 1 + 1);
  //~^ ERROR type annotations needed
}

fn check_multi1() {
  println!("{:?} {:?} {a} {a:?}", [], [], a = 1 + 1);
  //~^ ERROR type annotations needed
}

fn check_multi2() {
  println!("{:?} {:?} {a} {a:?} {b:?}", [], [], a = 1 + 1, b = []);
  //~^ ERROR type annotations needed
}

fn check_unformatted() {
  println!(" //~ ERROR type annotations needed
  {:?} {:?}
{a}
{a:?}",
        [],
 [],
a = 1 + 1);
}

fn main() {}