Rollup merge of #116231 - DaniPopes:simpler-lint-array, r=Nilstrieb
Remove `rustc_lint_defs::lint_array`
This commit is contained in:
commit
0c45018473
11 changed files with 23 additions and 36 deletions
|
@ -5,19 +5,18 @@ use rustc_hir::def::DefKind;
|
|||
use rustc_middle::query::Providers;
|
||||
use rustc_middle::ty::layout::LayoutError;
|
||||
use rustc_middle::ty::{self, Instance, Ty, TyCtxt};
|
||||
use rustc_session::lint::{lint_array, LintArray};
|
||||
use rustc_span::{sym, Span, Symbol};
|
||||
use rustc_target::abi::FIRST_VARIANT;
|
||||
|
||||
use crate::lints::{BuiltinClashingExtern, BuiltinClashingExternSub};
|
||||
use crate::types;
|
||||
use crate::{types, LintVec};
|
||||
|
||||
pub(crate) fn provide(providers: &mut Providers) {
|
||||
*providers = Providers { clashing_extern_declarations, ..*providers };
|
||||
}
|
||||
|
||||
pub(crate) fn get_lints() -> LintArray {
|
||||
lint_array!(CLASHING_EXTERN_DECLARATIONS)
|
||||
pub(crate) fn get_lints() -> LintVec {
|
||||
vec![CLASHING_EXTERN_DECLARATIONS]
|
||||
}
|
||||
|
||||
fn clashing_extern_declarations(tcx: TyCtxt<'_>, (): ()) {
|
||||
|
|
|
@ -130,7 +130,7 @@ pub use late::{check_crate, late_lint_mod, unerased_lint_store};
|
|||
pub use passes::{EarlyLintPass, LateLintPass};
|
||||
pub use rustc_session::lint::Level::{self, *};
|
||||
pub use rustc_session::lint::{BufferedEarlyLint, FutureIncompatibleInfo, Lint, LintId};
|
||||
pub use rustc_session::lint::{LintArray, LintPass};
|
||||
pub use rustc_session::lint::{LintPass, LintVec};
|
||||
|
||||
fluent_messages! { "../messages.ftl" }
|
||||
|
||||
|
|
|
@ -111,7 +111,7 @@ macro_rules! declare_combined_late_lint_pass {
|
|||
}
|
||||
}
|
||||
|
||||
$v fn get_lints() -> $crate::LintArray {
|
||||
$v fn get_lints() -> $crate::LintVec {
|
||||
let mut lints = Vec::new();
|
||||
$(lints.extend_from_slice(&$pass::get_lints());)*
|
||||
lints
|
||||
|
@ -226,7 +226,7 @@ macro_rules! declare_combined_early_lint_pass {
|
|||
}
|
||||
}
|
||||
|
||||
$v fn get_lints() -> $crate::LintArray {
|
||||
$v fn get_lints() -> $crate::LintVec {
|
||||
let mut lints = Vec::new();
|
||||
$(lints.extend_from_slice(&$pass::get_lints());)*
|
||||
lints
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue