From ce173c12e6416b1afa4aa460076d7c807fdcdccf Mon Sep 17 00:00:00 2001 From: flip1995 <9744647+flip1995@users.noreply.github.com> Date: Mon, 27 Aug 2018 23:24:42 +0200 Subject: Add deprecated_name argument to the register lint group functions --- src/librustc_plugin/registry.rs | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) (limited to 'src/librustc_plugin') diff --git a/src/librustc_plugin/registry.rs b/src/librustc_plugin/registry.rs index 5ef05cb1d6b..6c10ac7ea5c 100644 --- a/src/librustc_plugin/registry.rs +++ b/src/librustc_plugin/registry.rs @@ -53,7 +53,7 @@ pub struct Registry<'a> { pub late_lint_passes: Vec, #[doc(hidden)] - pub lint_groups: FxHashMap<&'static str, Vec>, + pub lint_groups: FxHashMap<&'static str, (Vec, Option<&'static str>)>, #[doc(hidden)] pub llvm_passes: Vec, @@ -170,8 +170,15 @@ impl<'a> Registry<'a> { self.late_lint_passes.push(lint_pass); } /// Register a lint group. - pub fn register_lint_group(&mut self, name: &'static str, to: Vec<&'static Lint>) { - self.lint_groups.insert(name, to.into_iter().map(|x| LintId::of(x)).collect()); + pub fn register_lint_group( + &mut self, + name: &'static str, + deprecated_name: Option<&'static str>, + to: Vec<&'static Lint> + ) { + self.lint_groups.insert(name, + (to.into_iter().map(|x| LintId::of(x)).collect(), + deprecated_name)); } /// Register an LLVM pass. -- cgit 1.4.1-3-g733a5