1
Fork 0

Rollup merge of #127308 - nnethercote:Attribute-cleanups, r=petrochenkov

Attribute cleanups

More refactoring done while trying to fix the final remaining test failure for #124141.

r? `@petrochenkov`
This commit is contained in:
Matthias Krüger 2024-07-07 14:22:01 +02:00 committed by GitHub
commit 510020ad4c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
11 changed files with 71 additions and 113 deletions

View file

@ -193,7 +193,7 @@ impl CfgEval<'_> {
// Re-parse the tokens, setting the `capture_cfg` flag to save extra information
// to the captured `AttrTokenStream` (specifically, we capture
// `AttrTokenTree::AttributesData` for all occurrences of `#[cfg]` and `#[cfg_attr]`)
// `AttrTokenTree::AttrsTarget` for all occurrences of `#[cfg]` and `#[cfg_attr]`)
let mut parser = Parser::new(&self.0.sess.psess, orig_tokens, None);
parser.capture_cfg = true;
match parse_annotatable_with(&mut parser) {