Skip to content

Commit c5fada9

Browse files
committed
implement rustc_force_inline parser
1 parent 4c343b0 commit c5fada9

File tree

3 files changed

+5
-2
lines changed

3 files changed

+5
-2
lines changed

compiler/rustc_attr_data_structures/src/attributes.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,8 @@ pub enum AttributeKind {
194194

195195
/// Represents [`#[repr]`](https://doc.rust-lang.org/stable/reference/type-layout.html#representations).
196196
Repr(ThinVec<(ReprAttr, Span)>),
197-
197+
/// Represents `#[rustc_force_inline]`
198+
RustcForceInline(Span, Option<Symbol>),
198199
/// Represents `#[stable]`, `#[unstable]` and `#[rustc_allowed_through_unstable_modules]`.
199200
Stability {
200201
stability: Stability,

compiler/rustc_attr_parsing/src/attributes/inline.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ use super::{AcceptContext, AttributeOrder, OnDuplicate};
1111
use crate::attributes::SingleAttributeParser;
1212
use crate::context::Stage;
1313
use crate::parser::ArgParser;
14+
use crate::session_diagnostics::IncorrectMetaItem;
1415

1516
pub(crate) struct InlineParser;
1617

compiler/rustc_attr_parsing/src/context.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ use rustc_span::{DUMMY_SP, ErrorGuaranteed, Span, Symbol, sym};
1818
use crate::attributes::allow_unstable::{AllowConstFnUnstableParser, AllowInternalUnstableParser};
1919
use crate::attributes::confusables::ConfusablesParser;
2020
use crate::attributes::deprecation::DeprecationParser;
21-
use crate::attributes::inline::InlineParser;
21+
use crate::attributes::inline::{InlineParser, RustcForceInlineParser};
2222
use crate::attributes::repr::ReprParser;
2323
use crate::attributes::stability::{
2424
BodyStabilityParser, ConstStabilityIndirectParser, ConstStabilityParser, StabilityParser,
@@ -106,6 +106,7 @@ attribute_parsers!(
106106
Single<ConstStabilityIndirectParser>,
107107
Single<DeprecationParser>,
108108
Single<InlineParser>,
109+
Single<RustcForceInlineParser>,
109110
Single<TransparencyParser>,
110111
// tidy-alphabetical-end
111112
];

0 commit comments

Comments
 (0)