diff options
| author | Nicholas Nethercote <n.nethercote@gmail.com> | 2023-10-04 09:51:03 +1100 |
|---|---|---|
| committer | Nicholas Nethercote <n.nethercote@gmail.com> | 2023-10-05 10:18:29 +1100 |
| commit | 53fe37de2e11537bf2953a29df3c5be8a8858850 (patch) | |
| tree | 4efe83d18213618f342f9a65658999153e87a2a0 /compiler/rustc_feature | |
| parent | 36aab8df0ab8a76f1c4f95ce8becefdd8a6fe526 (diff) | |
Remove unused `Span` from the `set` function in `State::Active`.
Diffstat (limited to 'compiler/rustc_feature')
| -rw-r--r-- | compiler/rustc_feature/src/active.rs | 8 | ||||
| -rw-r--r-- | compiler/rustc_feature/src/lib.rs | 4 |
2 files changed, 6 insertions, 6 deletions
diff --git a/compiler/rustc_feature/src/active.rs b/compiler/rustc_feature/src/active.rs index a02c04ecd3e..5173dc7ccaa 100644 --- a/compiler/rustc_feature/src/active.rs +++ b/compiler/rustc_feature/src/active.rs @@ -9,10 +9,10 @@ use rustc_span::Span; macro_rules! set { ($field: ident) => {{ - fn f(features: &mut Features, _: Span) { + fn f(features: &mut Features) { features.$field = true; } - f as fn(&mut Features, Span) + f as fn(&mut Features) }}; } @@ -123,9 +123,9 @@ macro_rules! declare_features { impl Feature { /// Sets this feature in `Features`. Panics if called on a non-active feature. - pub fn set(&self, features: &mut Features, span: Span) { + pub fn set(&self, features: &mut Features) { match self.state { - State::Active { set } => set(features, span), + State::Active { set } => set(features), _ => panic!("called `set` on feature `{}` which is not `active`", self.name), } } diff --git a/compiler/rustc_feature/src/lib.rs b/compiler/rustc_feature/src/lib.rs index 69e33115922..b4933d6339c 100644 --- a/compiler/rustc_feature/src/lib.rs +++ b/compiler/rustc_feature/src/lib.rs @@ -23,14 +23,14 @@ mod removed; #[cfg(test)] mod tests; -use rustc_span::{edition::Edition, symbol::Symbol, Span}; +use rustc_span::{edition::Edition, symbol::Symbol}; use std::fmt; use std::num::NonZeroU32; #[derive(Clone, Copy)] pub enum State { Accepted, - Active { set: fn(&mut Features, Span) }, + Active { set: fn(&mut Features) }, Removed { reason: Option<&'static str> }, Stabilized { reason: Option<&'static str> }, } |
