summaryrefslogtreecommitdiffstats
path: root/tests/ui/lint/unused_braces.stderr
blob: 0b4a1c321805ddea51a8b4261d5794fd89b38efc (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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
warning: unnecessary parentheses around assigned value
  --> $DIR/unused_braces.rs:10:13
   |
LL |     let _ = (7);
   |             ^ ^
   |
note: the lint level is defined here
  --> $DIR/unused_braces.rs:4:24
   |
LL | #![warn(unused_braces, unused_parens)]
   |                        ^^^^^^^^^^^^^
help: remove these parentheses
   |
LL -     let _ = (7);
LL +     let _ = 7;
   |

warning: unnecessary braces around `if` condition
  --> $DIR/unused_braces.rs:26:8
   |
LL |     if { true } {
   |        ^^    ^^
   |
note: the lint level is defined here
  --> $DIR/unused_braces.rs:4:9
   |
LL | #![warn(unused_braces, unused_parens)]
   |         ^^^^^^^^^^^^^
help: remove these braces
   |
LL -     if { true } {
LL +     if true {
   |

warning: unnecessary braces around `while` condition
  --> $DIR/unused_braces.rs:30:11
   |
LL |     while { false } {
   |           ^^     ^^
   |
help: remove these braces
   |
LL -     while { false } {
LL +     while false {
   |

warning: unnecessary braces around const expression
  --> $DIR/unused_braces.rs:34:17
   |
LL |     let _: [u8; { 3 }];
   |                 ^^ ^^
   |
help: remove these braces
   |
LL -     let _: [u8; { 3 }];
LL +     let _: [u8; 3];
   |

warning: unnecessary braces around function argument
  --> $DIR/unused_braces.rs:37:13
   |
LL |     consume({ 7 });
   |             ^^ ^^
   |
help: remove these braces
   |
LL -     consume({ 7 });
LL +     consume(7);
   |

warning: unnecessary braces around `return` value
  --> $DIR/unused_braces.rs:55:12
   |
LL |     return { println!("!") };
   |            ^^             ^^
   |
help: remove these braces
   |
LL -     return { println!("!") };
LL +     return println!("!");
   |

warning: 6 warnings emitted