Skip to content

Commit 3f67702

Browse files
Move main to top of tests
1 parent a451337 commit 3f67702

File tree

3 files changed

+11
-11
lines changed

3 files changed

+11
-11
lines changed

tests/ui/anon_trait_import.fixed

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
#![allow(unused)]
22
#![warn(clippy::anon_trait_import)]
33

4+
fn main() {}
5+
46
fn bad() {
57
use std::any::Any as _;
68

@@ -159,5 +161,3 @@ mod nested_mod_used_good5 {
159161
}
160162
}
161163
}
162-
163-
fn main() {}

tests/ui/anon_trait_import.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
#![allow(unused)]
22
#![warn(clippy::anon_trait_import)]
33

4+
fn main() {}
5+
46
fn bad() {
57
use std::any::Any;
68

@@ -159,5 +161,3 @@ mod nested_mod_used_good5 {
159161
}
160162
}
161163
}
162-
163-
fn main() {}

tests/ui/anon_trait_import.stderr

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
error: importing trait that is only used anonymously
2-
--> tests/ui/anon_trait_import.rs:5:19
2+
--> tests/ui/anon_trait_import.rs:7:19
33
|
44
LL | use std::any::Any;
55
| ^^^ help: use: `Any as _`
@@ -8,37 +8,37 @@ LL | use std::any::Any;
88
= help: to override `-D warnings` add `#[allow(clippy::anon_trait_import)]`
99

1010
error: importing trait that is only used anonymously
11-
--> tests/ui/anon_trait_import.rs:24:26
11+
--> tests/ui/anon_trait_import.rs:26:26
1212
|
1313
LL | use std::any::{self, Any, TypeId};
1414
| ^^^ help: use: `Any as _`
1515

1616
error: importing trait that is only used anonymously
17-
--> tests/ui/anon_trait_import.rs:36:19
17+
--> tests/ui/anon_trait_import.rs:38:19
1818
|
1919
LL | use std::any::Any as MyAny;
2020
| ^^^^^^^^^^^^ help: use: `Any as _`
2121

2222
error: importing trait that is only used anonymously
23-
--> tests/ui/anon_trait_import.rs:42:20
23+
--> tests/ui/anon_trait_import.rs:44:20
2424
|
2525
LL | use std::any::{Any as MyAny, TypeId as MyTypeId};
2626
| ^^^^^^^^^^^^ help: use: `Any as _`
2727

2828
error: importing trait that is only used anonymously
29-
--> tests/ui/anon_trait_import.rs:65:23
29+
--> tests/ui/anon_trait_import.rs:67:23
3030
|
3131
LL | use std::any::Any;
3232
| ^^^ help: use: `Any as _`
3333

3434
error: importing trait that is only used anonymously
35-
--> tests/ui/anon_trait_import.rs:106:19
35+
--> tests/ui/anon_trait_import.rs:108:19
3636
|
3737
LL | use std::any::Any;
3838
| ^^^ help: use: `Any as _`
3939

4040
error: importing trait that is only used anonymously
41-
--> tests/ui/anon_trait_import.rs:125:19
41+
--> tests/ui/anon_trait_import.rs:127:19
4242
|
4343
LL | use std::any::Any;
4444
| ^^^ help: use: `Any as _`

0 commit comments

Comments
 (0)