diff options
| author | Sasha Pourcelot <sasha.pourcelot@protonmail.com> | 2025-08-10 09:44:39 +0200 |
|---|---|---|
| committer | Sasha Pourcelot <sasha.pourcelot@protonmail.com> | 2025-08-15 11:19:29 +0200 |
| commit | 51bccdd1ab0802dd5a55bd06e956c8d547bdec2d (patch) | |
| tree | 9227bb0d8eceb978ddd3f052e129df3307c36290 /compiler/rustc_hir/src/attrs/data_structures.rs | |
| parent | 3507a749b365aae4eefa96ab700a9315d3280ee7 (diff) | |
| download | rust-51bccdd1ab0802dd5a55bd06e956c8d547bdec2d.tar.gz rust-51bccdd1ab0802dd5a55bd06e956c8d547bdec2d.zip | |
Port `#[custom_mir(..)]` to the new attribute system
Diffstat (limited to 'compiler/rustc_hir/src/attrs/data_structures.rs')
| -rw-r--r-- | compiler/rustc_hir/src/attrs/data_structures.rs | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/compiler/rustc_hir/src/attrs/data_structures.rs b/compiler/rustc_hir/src/attrs/data_structures.rs index 510fc832978..31715955ed3 100644 --- a/compiler/rustc_hir/src/attrs/data_structures.rs +++ b/compiler/rustc_hir/src/attrs/data_structures.rs @@ -205,6 +205,22 @@ pub enum Linkage { WeakODR, } +#[derive(Clone, Copy, Decodable, Debug, Encodable, PartialEq)] +#[derive(HashStable_Generic, PrintAttribute)] +pub enum MirDialect { + Analysis, + Built, + Runtime, +} + +#[derive(Clone, Copy, Decodable, Debug, Encodable, PartialEq)] +#[derive(HashStable_Generic, PrintAttribute)] +pub enum MirPhase { + Initial, + PostCleanup, + Optimized, +} + /// Represents parsed *built-in* inert attributes. /// /// ## Overview @@ -324,6 +340,9 @@ pub enum AttributeKind { /// Represents `#[coverage(..)]`. Coverage(Span, CoverageAttrKind), + /// Represents `#[custom_mir]`. + CustomMir(Option<(MirDialect, Span)>, Option<(MirPhase, Span)>, Span), + ///Represents `#[rustc_deny_explicit_impl]`. DenyExplicitImpl(Span), |
