We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 8ff78fe commit e811742Copy full SHA for e811742
src/overflow.rs
@@ -195,20 +195,12 @@ impl<'a> OverflowableItem<'a> {
195
OverflowableItem::NestedMetaItem(..) => SPECIAL_CASE_ATTR,
196
_ => &[],
197
};
198
- let additional_cases = if config.version() == Version::Two {
199
- self.special_cases_v2()
200
- } else {
201
- &[]
+ let additional_cases = match (self, config.version()) {
+ (OverflowableItem::MacroArg(..), Version::Two) => SPECIAL_CASE_MACROS_V2,
+ _ => &[],
202
203
base_cases.iter().chain(additional_cases)
204
}
205
-
206
- fn special_cases_v2(&self) -> &'static [(&'static str, usize)] {
207
- match self {
208
- OverflowableItem::MacroArg(..) => SPECIAL_CASE_MACROS_V2,
209
- _ => &[],
210
- }
211
212
213
214
pub(crate) trait IntoOverflowableItem<'a>: Rewrite + Spanned {
0 commit comments