diff options
| author | Jana Dönszelmann <jana@donsz.nl> | 2025-08-24 11:15:09 +0200 |
|---|---|---|
| committer | Jana Dönszelmann <jana@donsz.nl> | 2025-09-09 15:16:02 -0700 |
| commit | 0db2eb7734633fe55dacbb05dbc677a079301cab (patch) | |
| tree | 54ad9446ad07828bf656967aaa56a4ba1ba7a1c5 /compiler/rustc_hir/src | |
| parent | b262cae8575589997d4f2a9bc166d99cc48e5eb1 (diff) | |
| download | rust-0db2eb7734633fe55dacbb05dbc677a079301cab.tar.gz rust-0db2eb7734633fe55dacbb05dbc677a079301cab.zip | |
port `#[no_std]` to the new attribute parsing infrastructure
Diffstat (limited to 'compiler/rustc_hir/src')
| -rw-r--r-- | compiler/rustc_hir/src/attrs/data_structures.rs | 3 | ||||
| -rw-r--r-- | compiler/rustc_hir/src/attrs/encode_cross_crate.rs | 3 |
2 files changed, 5 insertions, 1 deletions
diff --git a/compiler/rustc_hir/src/attrs/data_structures.rs b/compiler/rustc_hir/src/attrs/data_structures.rs index c2a3844af02..ea11a99efbc 100644 --- a/compiler/rustc_hir/src/attrs/data_structures.rs +++ b/compiler/rustc_hir/src/attrs/data_structures.rs @@ -588,6 +588,9 @@ pub enum AttributeKind { /// Represents `#[no_mangle]` NoMangle(Span), + /// Represents `#[no_std]` + NoStd(Span), + /// Represents `#[non_exhaustive]` NonExhaustive(Span), diff --git a/compiler/rustc_hir/src/attrs/encode_cross_crate.rs b/compiler/rustc_hir/src/attrs/encode_cross_crate.rs index d46e8abf937..55521c15854 100644 --- a/compiler/rustc_hir/src/attrs/encode_cross_crate.rs +++ b/compiler/rustc_hir/src/attrs/encode_cross_crate.rs @@ -66,7 +66,8 @@ impl AttributeKind { Naked(..) => No, NoCore(..) => No, NoImplicitPrelude(..) => No, - NoMangle(..) => Yes, // Needed for rustdoc + NoMangle(..) => Yes, // Needed for rustdoc + NoStd(..) => No, NonExhaustive(..) => Yes, // Needed for rustdoc Optimize(..) => No, ParenSugar(..) => No, |
