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
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
#![feature(plugin)]
#![plugin(clippy)]
#![deny(clippy)]
//~^ NOTE: lint level defined here
//~| NOTE: lint level defined here
//~| NOTE: lint level defined here
//~| NOTE: lint level defined here
//~| NOTE: lint level defined here
//~| NOTE: lint level defined here
//~| NOTE: lint level defined here
//~| NOTE: lint level defined here
//~| NOTE: lint level defined here
#![allow(unused)]
fn main() {
let specter: i32;
let spectre: i32;
let apple: i32; //~ NOTE: existing binding defined here
//~^ NOTE: existing binding defined here
let bpple: i32; //~ ERROR: name is too similar
//~| HELP: separate the discriminating character by an underscore like: `b_pple`
//~| HELP: for further information visit
let cpple: i32; //~ ERROR: name is too similar
//~| HELP: separate the discriminating character by an underscore like: `c_pple`
//~| HELP: for further information visit
let a_bar: i32;
let b_bar: i32;
let c_bar: i32;
let items = [5];
for item in &items {
loop {}
}
let foo_x: i32;
let foo_y: i32;
let rhs: i32;
let lhs: i32;
let bla_rhs: i32;
let bla_lhs: i32;
let blubrhs: i32; //~ NOTE: existing binding defined here
let blublhs: i32; //~ ERROR: name is too similar
//~| HELP: for further information visit
let blubx: i32; //~ NOTE: existing binding defined here
let bluby: i32; //~ ERROR: name is too similar
//~| HELP: for further information visit
//~| HELP: separate the discriminating character by an underscore like: `blub_y`
let cake: i32; //~ NOTE: existing binding defined here
let cakes: i32;
let coke: i32; //~ ERROR: name is too similar
//~| HELP: for further information visit
match 5 {
cheese @ 1 => {},
rabbit => panic!(),
}
let cheese: i32;
match (42, 43) {
(cheese1, 1) => {},
(cheese2, 2) => panic!(),
_ => println!(""),
}
}
#[derive(Clone, Debug)]
enum MaybeInst {
Split,
Split1(usize),
Split2(usize),
}
struct InstSplit {
uiae: usize,
}
impl MaybeInst {
fn fill(&mut self) {
let filled = match *self {
MaybeInst::Split1(goto1) => panic!(1),
MaybeInst::Split2(goto2) => panic!(2),
_ => unimplemented!(),
};
unimplemented!()
}
}
fn bla() {
let a: i32;
let (b, c, d): (i32, i64, i16);
{
{
let cdefg: i32;
let blar: i32;
}
{
let e: i32; //~ ERROR: 5th binding whose name is just one char
//~| HELP: for further information visit
}
{
let e: i32; //~ ERROR: 5th binding whose name is just one char
//~| HELP: for further information visit
let f: i32; //~ ERROR: 6th binding whose name is just one char
//~| HELP: for further information visit
}
match 5 {
1 => println!(""),
e => panic!(), //~ ERROR: 5th binding whose name is just one char
//~| HELP: for further information visit
}
match 5 {
1 => println!(""),
_ => panic!(),
}
}
}