forked from rust-lang/rust-clippy
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Check the path length first * Use `is_from_proc_macro` * Use symbols instead of strings when checking crate names
- Loading branch information
Showing
16 changed files
with
414 additions
and
225 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
45 changes: 30 additions & 15 deletions
45
tests/ui-toml/absolute_paths/absolute_paths.allow_crates.stderr
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,29 +1,44 @@ | ||
error: consider bringing this path into scope with the `use` keyword | ||
--> tests/ui-toml/absolute_paths/absolute_paths.rs:40:5 | ||
--> tests/ui-toml/absolute_paths/absolute_paths.rs:14:13 | ||
| | ||
LL | std::f32::MAX; | ||
| ^^^^^^^^^^^^^ | ||
LL | let _ = std::path::is_separator(' '); | ||
| ^^^^^^^^^^^^^^^^^^^^^^^ | ||
| | ||
= note: `-D clippy::absolute-paths` implied by `-D warnings` | ||
= help: to override `-D warnings` add `#[allow(clippy::absolute_paths)]` | ||
note: the lint level is defined here | ||
--> tests/ui-toml/absolute_paths/absolute_paths.rs:7:9 | ||
| | ||
LL | #![deny(clippy::absolute_paths)] | ||
| ^^^^^^^^^^^^^^^^^^^^^^ | ||
|
||
error: consider bringing this path into scope with the `use` keyword | ||
--> tests/ui-toml/absolute_paths/absolute_paths.rs:20:13 | ||
| | ||
LL | let _ = ::std::path::MAIN_SEPARATOR; | ||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ||
|
||
error: consider bringing this path into scope with the `use` keyword | ||
--> tests/ui-toml/absolute_paths/absolute_paths.rs:25:13 | ||
| | ||
LL | let _ = std::collections::hash_map::HashMap::<i32, i32>::new(); | ||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ||
|
||
error: consider bringing this path into scope with the `use` keyword | ||
--> tests/ui-toml/absolute_paths/absolute_paths.rs:41:5 | ||
--> tests/ui-toml/absolute_paths/absolute_paths.rs:28:31 | ||
| | ||
LL | core::f32::MAX; | ||
| ^^^^^^^^^^^^^^ | ||
LL | let _: &std::path::Path = std::path::Path::new(""); | ||
| ^^^^^^^^^^^^^^^ | ||
|
||
error: consider bringing this path into scope with the `use` keyword | ||
--> tests/ui-toml/absolute_paths/absolute_paths.rs:42:5 | ||
--> tests/ui-toml/absolute_paths/absolute_paths.rs:28:13 | ||
| | ||
LL | ::core::f32::MAX; | ||
| ^^^^^^^^^^^^^^^^ | ||
LL | let _: &std::path::Path = std::path::Path::new(""); | ||
| ^^^^^^^^^^^^^^^ | ||
|
||
error: consider bringing this path into scope with the `use` keyword | ||
--> tests/ui-toml/absolute_paths/absolute_paths.rs:58:5 | ||
--> tests/ui-toml/absolute_paths/absolute_paths.rs:43:13 | ||
| | ||
LL | ::std::f32::MAX; | ||
| ^^^^^^^^^^^^^^^ | ||
LL | let _ = std::option::Option::None::<i32>; | ||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ||
|
||
error: aborting due to 4 previous errors | ||
error: aborting due to 6 previous errors | ||
|
14 changes: 14 additions & 0 deletions
14
tests/ui-toml/absolute_paths/absolute_paths.allow_long.stderr
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
error: consider bringing this path into scope with the `use` keyword | ||
--> tests/ui-toml/absolute_paths/absolute_paths.rs:25:13 | ||
| | ||
LL | let _ = std::collections::hash_map::HashMap::<i32, i32>::new(); | ||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ||
| | ||
note: the lint level is defined here | ||
--> tests/ui-toml/absolute_paths/absolute_paths.rs:7:9 | ||
| | ||
LL | #![deny(clippy::absolute_paths)] | ||
| ^^^^^^^^^^^^^^^^^^^^^^ | ||
|
||
error: aborting due to 1 previous error | ||
|
80 changes: 80 additions & 0 deletions
80
tests/ui-toml/absolute_paths/absolute_paths.default.stderr
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,80 @@ | ||
error: consider bringing this path into scope with the `use` keyword | ||
--> tests/ui-toml/absolute_paths/absolute_paths.rs:14:13 | ||
| | ||
LL | let _ = std::path::is_separator(' '); | ||
| ^^^^^^^^^^^^^^^^^^^^^^^ | ||
| | ||
note: the lint level is defined here | ||
--> tests/ui-toml/absolute_paths/absolute_paths.rs:7:9 | ||
| | ||
LL | #![deny(clippy::absolute_paths)] | ||
| ^^^^^^^^^^^^^^^^^^^^^^ | ||
|
||
error: consider bringing this path into scope with the `use` keyword | ||
--> tests/ui-toml/absolute_paths/absolute_paths.rs:20:13 | ||
| | ||
LL | let _ = ::std::path::MAIN_SEPARATOR; | ||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ||
|
||
error: consider bringing this path into scope with the `use` keyword | ||
--> tests/ui-toml/absolute_paths/absolute_paths.rs:25:13 | ||
| | ||
LL | let _ = std::collections::hash_map::HashMap::<i32, i32>::new(); | ||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ||
|
||
error: consider bringing this path into scope with the `use` keyword | ||
--> tests/ui-toml/absolute_paths/absolute_paths.rs:28:31 | ||
| | ||
LL | let _: &std::path::Path = std::path::Path::new(""); | ||
| ^^^^^^^^^^^^^^^ | ||
|
||
error: consider bringing this path into scope with the `use` keyword | ||
--> tests/ui-toml/absolute_paths/absolute_paths.rs:28:13 | ||
| | ||
LL | let _: &std::path::Path = std::path::Path::new(""); | ||
| ^^^^^^^^^^^^^^^ | ||
|
||
error: consider bringing this path into scope with the `use` keyword | ||
--> tests/ui-toml/absolute_paths/absolute_paths.rs:37:13 | ||
| | ||
LL | let _ = ::core::clone::Clone::clone(&0i32); | ||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ||
|
||
error: consider bringing this path into scope with the `use` keyword | ||
--> tests/ui-toml/absolute_paths/absolute_paths.rs:40:13 | ||
| | ||
LL | let _ = <i32 as core::clone::Clone>::clone(&0i32); | ||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ||
|
||
error: consider bringing this path into scope with the `use` keyword | ||
--> tests/ui-toml/absolute_paths/absolute_paths.rs:43:13 | ||
| | ||
LL | let _ = std::option::Option::None::<i32>; | ||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ||
|
||
error: consider bringing this path into scope with the `use` keyword | ||
--> tests/ui-toml/absolute_paths/absolute_paths.rs:65:17 | ||
| | ||
LL | impl<T: core::cmp::Eq> core::fmt::Display for X<T> | ||
| ^^^^^^^^^^^^^ | ||
|
||
error: consider bringing this path into scope with the `use` keyword | ||
--> tests/ui-toml/absolute_paths/absolute_paths.rs:70:18 | ||
| | ||
LL | where T: core::clone::Clone | ||
| ^^^^^^^^^^^^^^^^^^ | ||
|
||
error: consider bringing this path into scope with the `use` keyword | ||
--> tests/ui-toml/absolute_paths/absolute_paths.rs:65:32 | ||
| | ||
LL | impl<T: core::cmp::Eq> core::fmt::Display for X<T> | ||
| ^^^^^^^^^^^^^^^^^^ | ||
|
||
error: consider bringing this path into scope with the `use` keyword | ||
--> tests/ui-toml/absolute_paths/absolute_paths.rs:116:5 | ||
| | ||
LL | crate::m1::S | ||
| ^^^^^^^^^^^^ | ||
|
||
error: aborting due to 12 previous errors | ||
|
71 changes: 0 additions & 71 deletions
71
tests/ui-toml/absolute_paths/absolute_paths.disallow_crates.stderr
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.