diff options
| author | Jonathan Brouwer <jonathantbrouwer@gmail.com> | 2025-07-07 09:04:21 +0200 |
|---|---|---|
| committer | Jonathan Brouwer <jonathantbrouwer@gmail.com> | 2025-07-15 09:01:00 +0200 |
| commit | a14baf1e56cf9049992c25e0abb9ee4a7242e057 (patch) | |
| tree | 22d1c4f06aed22445f4954d76600b39791167c28 /compiler/rustc_ast/src | |
| parent | 7f2065a4bae1faed5bab928c670964eafbf43b55 (diff) | |
| download | rust-a14baf1e56cf9049992c25e0abb9ee4a7242e057.tar.gz rust-a14baf1e56cf9049992c25e0abb9ee4a7242e057.zip | |
Define datastructures for `#[cfg]` attribute, move StrippedCfgItem
Diffstat (limited to 'compiler/rustc_ast/src')
| -rw-r--r-- | compiler/rustc_ast/src/expand/mod.rs | 17 |
1 files changed, 0 insertions, 17 deletions
diff --git a/compiler/rustc_ast/src/expand/mod.rs b/compiler/rustc_ast/src/expand/mod.rs index 323a8fab6d5..069bff67b97 100644 --- a/compiler/rustc_ast/src/expand/mod.rs +++ b/compiler/rustc_ast/src/expand/mod.rs @@ -1,24 +1,7 @@ //! Definitions shared by macros / syntax extensions and e.g. `rustc_middle`. use rustc_macros::{Decodable, Encodable, HashStable_Generic}; -use rustc_span::Ident; -use rustc_span::def_id::DefId; - -use crate::MetaItem; pub mod allocator; pub mod autodiff_attrs; pub mod typetree; - -#[derive(Debug, Clone, Encodable, Decodable, HashStable_Generic)] -pub struct StrippedCfgItem<ModId = DefId> { - pub parent_module: ModId, - pub ident: Ident, - pub cfg: MetaItem, -} - -impl<ModId> StrippedCfgItem<ModId> { - pub fn map_mod_id<New>(self, f: impl FnOnce(ModId) -> New) -> StrippedCfgItem<New> { - StrippedCfgItem { parent_module: f(self.parent_module), ident: self.ident, cfg: self.cfg } - } -} |
