Skip to content

Commit

Permalink
Rename LintArray to LintVec
Browse files Browse the repository at this point in the history
  • Loading branch information
DaniPopes committed Sep 28, 2023
1 parent ad65326 commit 4b51d2b
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions compiler/rustc_lint/src/foreign_modules.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,13 @@ use rustc_span::{sym, Span, Symbol};
use rustc_target::abi::FIRST_VARIANT;

use crate::lints::{BuiltinClashingExtern, BuiltinClashingExternSub};
use crate::{types, LintArray};
use crate::{types, LintVec};

pub(crate) fn provide(providers: &mut Providers) {
*providers = Providers { clashing_extern_declarations, ..*providers };
}

pub(crate) fn get_lints() -> LintArray {
pub(crate) fn get_lints() -> LintVec {
vec![CLASHING_EXTERN_DECLARATIONS]
}

Expand Down
2 changes: 1 addition & 1 deletion compiler/rustc_lint/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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" }

Expand Down
4 changes: 2 additions & 2 deletions compiler/rustc_lint/src/passes.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions compiler/rustc_lint_defs/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -785,7 +785,7 @@ macro_rules! declare_tool_lint {
);
}

pub type LintArray = Vec<&'static Lint>;
pub type LintVec = Vec<&'static Lint>;

pub trait LintPass {
fn name(&self) -> &'static str;
Expand All @@ -799,7 +799,7 @@ macro_rules! impl_lint_pass {
fn name(&self) -> &'static str { stringify!($ty) }
}
impl $ty {
pub fn get_lints() -> $crate::LintArray { vec![$($lint),*] }
pub fn get_lints() -> $crate::LintVec { vec![$($lint),*] }
}
};
}
Expand Down

0 comments on commit 4b51d2b

Please sign in to comment.