mirror of
https://github.com/rust-lang/rust-clippy
synced 2024-11-21 20:23:12 +00:00
Move MSRV implementation to clippy_utils
This commit is contained in:
parent
786fbd6d68
commit
4460db0850
7 changed files with 6 additions and 9 deletions
|
@ -1,10 +1,10 @@
|
|||
use crate::ClippyConfiguration;
|
||||
use crate::msrvs::Msrv;
|
||||
use crate::types::{
|
||||
DisallowedPath, MacroMatcher, MatchLintBehaviour, PubUnderscoreFieldsBehaviour, Rename, SourceItemOrdering,
|
||||
SourceItemOrderingCategory, SourceItemOrderingModuleItemGroupings, SourceItemOrderingModuleItemKind,
|
||||
SourceItemOrderingTraitAssocItemKind, SourceItemOrderingTraitAssocItemKinds,
|
||||
};
|
||||
use clippy_utils::msrvs::Msrv;
|
||||
use rustc_errors::Applicability;
|
||||
use rustc_session::Session;
|
||||
use rustc_span::edit_distance::edit_distance;
|
||||
|
|
|
@ -13,18 +13,12 @@
|
|||
rustc::untranslatable_diagnostic
|
||||
)]
|
||||
|
||||
extern crate rustc_ast;
|
||||
extern crate rustc_attr;
|
||||
#[allow(unused_extern_crates)]
|
||||
extern crate rustc_driver;
|
||||
extern crate rustc_errors;
|
||||
extern crate rustc_session;
|
||||
extern crate rustc_span;
|
||||
extern crate smallvec;
|
||||
|
||||
mod conf;
|
||||
mod metadata;
|
||||
pub mod msrvs;
|
||||
pub mod types;
|
||||
|
||||
pub use conf::{Conf, get_configuration_metadata, lookup_conf_file, sanitize_explanation};
|
||||
|
|
|
@ -10,6 +10,7 @@ arrayvec = { version = "0.7", default-features = false }
|
|||
itertools = "0.12"
|
||||
# FIXME(f16_f128): remove when no longer needed for parsing
|
||||
rustc_apfloat = "0.2.0"
|
||||
serde = { version = "1.0", features = ["derive"] }
|
||||
|
||||
[package.metadata.rust-analyzer]
|
||||
# This crate uses #[feature(rustc_private)]
|
||||
|
|
|
@ -50,6 +50,7 @@ extern crate rustc_session;
|
|||
extern crate rustc_span;
|
||||
extern crate rustc_target;
|
||||
extern crate rustc_trait_selection;
|
||||
extern crate smallvec;
|
||||
|
||||
#[macro_use]
|
||||
pub mod sym_helper;
|
||||
|
@ -65,6 +66,7 @@ pub mod higher;
|
|||
mod hir_utils;
|
||||
pub mod macros;
|
||||
pub mod mir;
|
||||
pub mod msrvs;
|
||||
pub mod numeric_literal;
|
||||
pub mod paths;
|
||||
pub mod ptr;
|
||||
|
|
|
@ -36,7 +36,7 @@ pub const CHILD_KILL: [&str; 4] = ["std", "process", "Child", "kill"];
|
|||
pub const PANIC_ANY: [&str; 3] = ["std", "panic", "panic_any"];
|
||||
|
||||
// Paths in clippy itself
|
||||
pub const MSRV: [&str; 3] = ["clippy_config", "msrvs", "Msrv"];
|
||||
pub const MSRV: [&str; 3] = ["clippy_utils", "msrvs", "Msrv"];
|
||||
|
||||
// Paths in external crates
|
||||
#[expect(clippy::invalid_paths)] // internal lints do not know about all external crates
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
// of terminologies might not be relevant in the context of Clippy. Note that its behavior might
|
||||
// differ from the time of `rustc` even if the name stays the same.
|
||||
|
||||
use clippy_config::msrvs::{self, Msrv};
|
||||
use crate::msrvs::{self, Msrv};
|
||||
use hir::LangItem;
|
||||
use rustc_attr::StableSince;
|
||||
use rustc_const_eval::check_consts::ConstCx;
|
||||
|
|
Loading…
Reference in a new issue