mirror of
https://github.com/rust-lang/rust-clippy
synced 2024-11-27 15:11:30 +00:00
Allow internal lint INVALID_PATHS for itertools path
Since clippy_utils doesn't depend on the itertools crate anymore, the lint can't find the path.
This commit is contained in:
parent
707494eca9
commit
ec38746b4a
3 changed files with 3 additions and 2 deletions
|
@ -892,7 +892,7 @@ impl<'tcx> LateLintPass<'tcx> for InvalidPaths {
|
||||||
}).collect();
|
}).collect();
|
||||||
if !check_path(cx, &path[..]);
|
if !check_path(cx, &path[..]);
|
||||||
then {
|
then {
|
||||||
span_lint(cx, CLIPPY_LINTS_INTERNAL, item.span, "invalid path");
|
span_lint(cx, INVALID_PATHS, item.span, "invalid path");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -68,6 +68,7 @@ pub const IO_WRITE: [&str; 3] = ["std", "io", "Write"];
|
||||||
pub const IPADDR_V4: [&str; 5] = ["std", "net", "ip", "IpAddr", "V4"];
|
pub const IPADDR_V4: [&str; 5] = ["std", "net", "ip", "IpAddr", "V4"];
|
||||||
pub const IPADDR_V6: [&str; 5] = ["std", "net", "ip", "IpAddr", "V6"];
|
pub const IPADDR_V6: [&str; 5] = ["std", "net", "ip", "IpAddr", "V6"];
|
||||||
pub const ITER_REPEAT: [&str; 5] = ["core", "iter", "sources", "repeat", "repeat"];
|
pub const ITER_REPEAT: [&str; 5] = ["core", "iter", "sources", "repeat", "repeat"];
|
||||||
|
#[allow(clippy::invalid_paths)] // internal lints do not know about all external crates
|
||||||
pub const ITERTOOLS_NEXT_TUPLE: [&str; 3] = ["itertools", "Itertools", "next_tuple"];
|
pub const ITERTOOLS_NEXT_TUPLE: [&str; 3] = ["itertools", "Itertools", "next_tuple"];
|
||||||
#[cfg(feature = "internal-lints")]
|
#[cfg(feature = "internal-lints")]
|
||||||
pub const KW_MODULE: [&str; 3] = ["rustc_span", "symbol", "kw"];
|
pub const KW_MODULE: [&str; 3] = ["rustc_span", "symbol", "kw"];
|
||||||
|
|
|
@ -4,7 +4,7 @@ error: invalid path
|
||||||
LL | pub const BAD_CRATE_PATH: [&str; 2] = ["bad", "path"];
|
LL | pub const BAD_CRATE_PATH: [&str; 2] = ["bad", "path"];
|
||||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||||
|
|
|
|
||||||
= note: `-D clippy::clippy-lints-internal` implied by `-D warnings`
|
= note: `-D clippy::invalid-paths` implied by `-D warnings`
|
||||||
|
|
||||||
error: invalid path
|
error: invalid path
|
||||||
--> $DIR/invalid_paths.rs:20:5
|
--> $DIR/invalid_paths.rs:20:5
|
||||||
|
|
Loading…
Reference in a new issue