Skip to content

Commit

Permalink
Move main to top of tests
Browse files Browse the repository at this point in the history
  • Loading branch information
RuairidhWilliamson committed Sep 1, 2024
1 parent da52006 commit 01856a3
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 11 deletions.
4 changes: 2 additions & 2 deletions tests/ui/anon_trait_import.fixed
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
#![allow(unused)]
#![warn(clippy::anon_trait_import)]

fn main() {}

fn bad() {
use std::any::Any as _;

Expand Down Expand Up @@ -159,5 +161,3 @@ mod nested_mod_used_good5 {
}
}
}

fn main() {}
4 changes: 2 additions & 2 deletions tests/ui/anon_trait_import.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
#![allow(unused)]
#![warn(clippy::anon_trait_import)]

fn main() {}

fn bad() {
use std::any::Any;

Expand Down Expand Up @@ -159,5 +161,3 @@ mod nested_mod_used_good5 {
}
}
}

fn main() {}
14 changes: 7 additions & 7 deletions tests/ui/anon_trait_import.stderr
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
error: importing trait that is only used anonymously
--> tests/ui/anon_trait_import.rs:5:19
--> tests/ui/anon_trait_import.rs:7:19
|
LL | use std::any::Any;
| ^^^ help: use: `Any as _`
Expand All @@ -8,37 +8,37 @@ LL | use std::any::Any;
= help: to override `-D warnings` add `#[allow(clippy::anon_trait_import)]`

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

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

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

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

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

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

0 comments on commit 01856a3

Please sign in to comment.