diff options
| author | bors <bors@rust-lang.org> | 2025-07-15 08:38:13 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2025-07-15 08:38:13 +0000 |
| commit | a9fb6103b05c6ad6eee6bed4c0bb5a2e8e1024c6 (patch) | |
| tree | 635bf7b454df9fe8fbb5d76d8f75102f59e33b6b /compiler/rustc_ast_lowering/src/lib.rs | |
| parent | 7f2065a4bae1faed5bab928c670964eafbf43b55 (diff) | |
| parent | 7a7c74ad89df9f87824fa17fbbe0448d9ab6f7cc (diff) | |
| download | rust-a9fb6103b05c6ad6eee6bed4c0bb5a2e8e1024c6.tar.gz rust-a9fb6103b05c6ad6eee6bed4c0bb5a2e8e1024c6.zip | |
Auto merge of #143460 - JonathanBrouwer:cfg_parser, r=jdonszelmann
Port `#[cfg]` to the new attribute parsing infrastructure Ports `#[cfg]` to the new attribute parsing infrastructure for https://github.com/rust-lang/rust/issues/131229#issuecomment-2971353197 I've split this PR into commits for reviewability, and left some comments to clarify things
Diffstat (limited to 'compiler/rustc_ast_lowering/src/lib.rs')
| -rw-r--r-- | compiler/rustc_ast_lowering/src/lib.rs | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/compiler/rustc_ast_lowering/src/lib.rs b/compiler/rustc_ast_lowering/src/lib.rs index 348fe2ee40a..1c96a375035 100644 --- a/compiler/rustc_ast_lowering/src/lib.rs +++ b/compiler/rustc_ast_lowering/src/lib.rs @@ -42,7 +42,7 @@ use std::sync::Arc; use rustc_ast::node_id::NodeMap; use rustc_ast::{self as ast, *}; -use rustc_attr_parsing::{AttributeParser, OmitDoc}; +use rustc_attr_parsing::{AttributeParser, Late, OmitDoc}; use rustc_data_structures::fingerprint::Fingerprint; use rustc_data_structures::sorted_map::SortedMap; use rustc_data_structures::stable_hasher::{HashStable, StableHasher}; @@ -192,7 +192,12 @@ impl<'a, 'hir> LoweringContext<'a, 'hir> { // interact with `gen`/`async gen` blocks allow_async_iterator: [sym::gen_future, sym::async_iterator].into(), - attribute_parser: AttributeParser::new(tcx.sess, tcx.features(), registered_tools), + attribute_parser: AttributeParser::new( + tcx.sess, + tcx.features(), + registered_tools, + Late, + ), delayed_lints: Vec::new(), } } |
