X-Git-Url: https://git.lizzy.rs/?a=blobdiff_plain;f=clippy_lints%2Fsrc%2Fdisallowed_types.rs;h=14f89edce615db9993d811d34e6e8d42d62f8b14;hb=c07cbb9ea65bb4ed4c78fa4b664474ea234bbc46;hp=eaed40327136f75636b013e37ee400b7a9318790;hpb=69750711d3742e4f2c418d5459d32a5a12ef4bfc;p=rust.git diff --git a/clippy_lints/src/disallowed_types.rs b/clippy_lints/src/disallowed_types.rs index eaed4032713..14f89edce61 100644 --- a/clippy_lints/src/disallowed_types.rs +++ b/clippy_lints/src/disallowed_types.rs @@ -14,6 +14,9 @@ /// ### What it does /// Denies the configured types in clippy.toml. /// + /// Note: Even though this lint is warn-by-default, it will only trigger if + /// types are defined in the clippy.toml file. + /// /// ### Why is this bad? /// Some types are undesirable in certain contexts. /// @@ -44,7 +47,7 @@ /// ``` #[clippy::version = "1.55.0"] pub DISALLOWED_TYPES, - nursery, + style, "use of disallowed types" } #[derive(Clone, Debug)] @@ -93,7 +96,7 @@ fn check_crate(&mut self, cx: &LateContext<'_>) { ), }; let segs: Vec<_> = path.split("::").collect(); - match clippy_utils::path_to_res(cx, &segs) { + match clippy_utils::def_path_res(cx, &segs) { Res::Def(_, id) => { self.def_ids.insert(id, reason); },