Skip to content

Commit 1509160

Browse files
committed
Add explanation for inner attribute
1 parent 10226da commit 1509160

File tree

1 file changed

+35
-7
lines changed
  • src/librustc_error_codes/error_codes

1 file changed

+35
-7
lines changed
Lines changed: 35 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,27 @@
11
An unknown tool name found in scoped lint
22

3-
Erroneous code example:
3+
Erroneous code examples:
44

55
```compile_fail,E0710
66
#[allow(clipp::filter_map)] // error!`
77
fn main() {
8-
/**
9-
*business logic
10-
*/
8+
// business logic
9+
}
10+
```
11+
12+
```compile_fail,E0710
13+
#[warn(clipp::filter_map)] // error!`
14+
fn main() {
15+
// business logic
16+
}
17+
```
18+
19+
```compile_fail,E0710
20+
fn main() {
21+
#![deny(clipp::filter_map)] //error!
22+
fn filter() {
23+
//logic
24+
}
1125
}
1226
```
1327

@@ -17,8 +31,22 @@ forget to import it in you project:
1731
```
1832
#[allow(clippy::filter_map)] // ok!
1933
fn main() {
20-
/**
21-
*business logic
22-
*/
34+
// business logic
35+
}
36+
```
37+
38+
```
39+
#[warn(clippy::filter_map)] // ok!
40+
fn main() {
41+
// business logic
42+
}
43+
```
44+
45+
```
46+
fn main() {
47+
#![deny(clippy::filter_map)] // ok!
48+
fn filter() {
49+
//logic
50+
}
2351
}
2452
```

0 commit comments

Comments
 (0)