We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
@
1 parent 0ca92de commit a47ae57Copy full SHA for a47ae57
compiler/rustc_parse/src/parser/attr_wrapper.rs
@@ -325,12 +325,9 @@ impl<'a> Parser<'a> {
325
replace_ranges,
326
});
327
328
- // If we support tokens at all
329
- if let Some(target_tokens) = ret.tokens_mut() {
330
- if target_tokens.is_none() {
331
- // Store our newly captured tokens into the AST node.
332
- *target_tokens = Some(tokens.clone());
333
- }
+ // If we support tokens and don't already have them, store the newly captured tokens.
+ if let Some(target_tokens @ None) = ret.tokens_mut() {
+ *target_tokens = Some(tokens.clone());
334
}
335
336
let final_attrs = ret.attrs();
0 commit comments