We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 1886123 + 56a2a2a commit 2f0a855Copy full SHA for 2f0a855
compiler/rustc_ast/src/tokenstream.rs
@@ -218,8 +218,7 @@ impl AttrAnnotatedTokenStream {
218
AttrAnnotatedTokenTree::Attributes(data) => {
219
let mut outer_attrs = Vec::new();
220
let mut inner_attrs = Vec::new();
221
- let attrs: Vec<_> = data.attrs.clone().into();
222
- for attr in attrs {
+ for attr in &data.attrs {
223
match attr.style {
224
crate::AttrStyle::Outer => {
225
assert!(
@@ -264,7 +263,7 @@ impl AttrAnnotatedTokenStream {
264
263
// so we never reach this code.
265
266
let mut builder = TokenStreamBuilder::new();
267
- for inner_attr in &inner_attrs {
+ for inner_attr in inner_attrs {
268
builder.push(inner_attr.tokens().to_tokenstream());
269
}
270
builder.push(delim_tokens.clone());
0 commit comments