Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit e09b31f

Browse files
committedJun 24, 2025·
Auto merge of #142942 - workingjubilee:rollup-lgz8914, r=workingjubilee
Rollup of 8 pull requests Successful merges: - #140622 (compiletest: Improve diagnostics for line annotation mismatches) - #142641 (Generate symbols.o for proc-macros too) - #142695 (Port `#[rustc_skip_during_method_dispatch]` to the new attribute system) - #142742 ([win][aarch64] Fix linking statics on Arm64EC, take 2) - #142894 (phantom_variance_markers: fix identifier usage in macro) - #142928 (Fix hang in --print=file-names in bootstrap) - #142930 (Account for beta revisions when normalizing versions) - #142932 (rustdoc-json: Keep empty generic args if parenthesized) r? `@ghost` `@rustbot` modify labels: rollup
2 parents 99b18d6 + 87b5f09 commit e09b31f

File tree

67 files changed

+805
-227
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

67 files changed

+805
-227
lines changed
 

‎compiler/rustc_attr_data_structures/src/attributes.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -259,6 +259,9 @@ pub enum AttributeKind {
259259
/// Represents [`#[repr]`](https://doc.rust-lang.org/stable/reference/type-layout.html#representations).
260260
Repr(ThinVec<(ReprAttr, Span)>),
261261

262+
/// Represents `#[rustc_skip_during_method_dispatch]`.
263+
SkipDuringMethodDispatch { array: bool, boxed_slice: bool, span: Span },
264+
262265
/// Represents `#[stable]`, `#[unstable]` and `#[rustc_allowed_through_unstable_modules]`.
263266
Stability {
264267
stability: Stability,

‎compiler/rustc_attr_parsing/src/attributes/codegen_attrs.rs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,8 @@ impl<S: Stage> SingleAttributeParser<S> for ColdParser {
5050
const TEMPLATE: AttributeTemplate = template!(Word);
5151

5252
fn convert(cx: &mut AcceptContext<'_, '_, S>, args: &ArgParser<'_>) -> Option<AttributeKind> {
53-
if !args.no_args() {
54-
cx.expected_no_args(args.span().unwrap_or(cx.attr_span));
53+
if let Err(span) = args.no_args() {
54+
cx.expected_no_args(span);
5555
return None;
5656
}
5757

@@ -67,8 +67,8 @@ pub(crate) struct NakedParser {
6767
impl<S: Stage> AttributeParser<S> for NakedParser {
6868
const ATTRIBUTES: AcceptMapping<Self, S> =
6969
&[(&[sym::naked], template!(Word), |this, cx, args| {
70-
if !args.no_args() {
71-
cx.expected_no_args(args.span().unwrap_or(cx.attr_span));
70+
if let Err(span) = args.no_args() {
71+
cx.expected_no_args(span);
7272
return;
7373
}
7474

@@ -175,10 +175,10 @@ impl<S: Stage> SingleAttributeParser<S> for NoMangleParser {
175175
const TEMPLATE: AttributeTemplate = template!(Word);
176176

177177
fn convert(cx: &mut AcceptContext<'_, '_, S>, args: &ArgParser<'_>) -> Option<AttributeKind> {
178-
if !args.no_args() {
179-
cx.expected_no_args(args.span().unwrap_or(cx.attr_span));
178+
if let Err(span) = args.no_args() {
179+
cx.expected_no_args(span);
180180
return None;
181-
};
181+
}
182182

183183
Some(AttributeKind::NoMangle(cx.attr_span))
184184
}

0 commit comments

Comments
 (0)
Please sign in to comment.