Remove Attribute::is_sugared_doc
diff --git a/src/attr.rs b/src/attr.rs
index 6512412..83ad8d7 100644
--- a/src/attr.rs
+++ b/src/attr.rs
@@ -39,8 +39,8 @@
///
/// The `style` field of type `AttrStyle` distinguishes whether an attribute
/// is outer or inner. Doc comments and block comments are promoted to
- /// attributes that have `is_sugared_doc` set to true, as this is how they
- /// are processed by the compiler and by `macro_rules!` macros.
+ /// attributes, as this is how they are processed by the compiler and by
+ /// `macro_rules!` macros.
///
/// The `path` field gives the possibly colon-delimited path against which
/// the attribute is resolved. It is equal to `"doc"` for desugared doc
@@ -64,7 +64,6 @@
pub bracket_token: token::Bracket,
pub path: Path,
pub tts: TokenStream,
- pub is_sugared_doc: bool,
}
}
@@ -79,7 +78,6 @@
&& self.bracket_token == other.bracket_token
&& self.path == other.path
&& TokenStreamHelper(&self.tts) == TokenStreamHelper(&other.tts)
- && self.is_sugared_doc == other.is_sugared_doc
}
}
@@ -94,7 +92,6 @@
self.bracket_token.hash(state);
self.path.hash(state);
TokenStreamHelper(&self.tts).hash(state);
- self.is_sugared_doc.hash(state);
}
}
@@ -423,7 +420,6 @@
style: AttrStyle::Inner(bang),
path: path,
tts: tts,
- is_sugared_doc: false,
pound_token: pound,
bracket_token: bracket,
}
@@ -441,7 +437,6 @@
eq(span),
lit,
].into_iter().collect(),
- is_sugared_doc: true,
pound_token: Token,
bracket_token: token::Bracket(span),
}
@@ -463,7 +458,6 @@
style: AttrStyle::Outer,
path: path,
tts: tts,
- is_sugared_doc: false,
pound_token: pound,
bracket_token: bracket,
}
@@ -481,7 +475,6 @@
eq(span),
lit,
].into_iter().collect(),
- is_sugared_doc: true,
pound_token: Token,
bracket_token: token::Bracket(span),
}
diff --git a/src/gen/fold.rs b/src/gen/fold.rs
index aac8f99..53f9341 100644
--- a/src/gen/fold.rs
+++ b/src/gen/fold.rs
@@ -956,7 +956,6 @@
bracket_token: Bracket(tokens_helper(_visitor, &_i.bracket_token.span)),
path: _visitor.fold_path(_i.path),
tts: _i.tts,
- is_sugared_doc: _i.is_sugared_doc,
}
}
#[cfg(any(feature = "full", feature = "derive"))]
diff --git a/src/gen/visit.rs b/src/gen/visit.rs
index 91563c9..6505045 100644
--- a/src/gen/visit.rs
+++ b/src/gen/visit.rs
@@ -937,7 +937,6 @@
tokens_helper(_visitor, &_i.bracket_token.span);
_visitor.visit_path(&_i.path);
skip!(_i.tts);
- skip!(_i.is_sugared_doc);
}
#[cfg(any(feature = "full", feature = "derive"))]
pub fn visit_bare_fn_arg<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast BareFnArg) {
diff --git a/src/gen/visit_mut.rs b/src/gen/visit_mut.rs
index 0f344b8..43c4a43 100644
--- a/src/gen/visit_mut.rs
+++ b/src/gen/visit_mut.rs
@@ -941,7 +941,6 @@
tokens_helper(_visitor, &mut _i.bracket_token.span);
_visitor.visit_path_mut(&mut _i.path);
skip!(_i.tts);
- skip!(_i.is_sugared_doc);
}
#[cfg(any(feature = "full", feature = "derive"))]
pub fn visit_bare_fn_arg_mut<V: VisitMut + ?Sized>(_visitor: &mut V, _i: &mut BareFnArg) {
diff --git a/tests/test_derive_input.rs b/tests/test_derive_input.rs
index 5ca2c72..045e506 100644
--- a/tests/test_derive_input.rs
+++ b/tests/test_derive_input.rs
@@ -84,7 +84,6 @@
Parenthesis,
vec![word("Debug"), op(','), word("Clone")],
)]),
- is_sugared_doc: false,
}],
generics: Generics::default(),
data: Data::Struct(DataStruct {
@@ -254,7 +253,6 @@
" See the std::result module documentation for details.",
)),
]),
- is_sugared_doc: false,
},
Attribute {
bracket_token: Default::default(),
@@ -262,7 +260,6 @@
style: AttrStyle::Outer,
path: ident("must_use").into(),
tts: TokenStream::new(),
- is_sugared_doc: false,
},
],
generics: Generics {
@@ -447,7 +444,6 @@
],
),
]),
- is_sugared_doc: false,
}],
generics: Generics::default(),
data: Data::Struct(DataStruct {
@@ -483,7 +479,6 @@
segments: punctuated![PathSegment::from(ident("inert"))],
},
tts: TokenStream::from_iter(vec![op('<'), word("T"), op('>')]),
- is_sugared_doc: false,
}],
generics: Generics::default(),
data: Data::Struct(DataStruct {
@@ -522,7 +517,6 @@
],
},
tts: TokenStream::new(),
- is_sugared_doc: false,
}],
generics: Generics::default(),
data: Data::Struct(DataStruct {
diff --git a/tests/test_generics.rs b/tests/test_generics.rs
index fe33fbd..33e7768 100644
--- a/tests/test_generics.rs
+++ b/tests/test_generics.rs
@@ -54,7 +54,6 @@
style: AttrStyle::Outer,
path: ident("may_dangle").into(),
tts: TokenStream::new(),
- is_sugared_doc: false,
}],
ident: ident("T"),
bounds: punctuated![TypeParamBound::Lifetime(Lifetime::new(
diff --git a/tests/test_token_trees.rs b/tests/test_token_trees.rs
index c385727..02d8f48 100644
--- a/tests/test_token_trees.rs
+++ b/tests/test_token_trees.rs
@@ -82,7 +82,6 @@
bracket_token: Default::default(),
path: Ident::new("test", Span::call_site()).into(),
tts,
- is_sugared_doc: false,
}
}