Skip to content

Commit eadc761

Browse files
committedMar 21, 2025
Auto merge of rust-lang#138771 - matthiaskrgr:rollup-w8mnn3t, r=matthiaskrgr
Rollup of 10 pull requests Successful merges: - rust-lang#138364 (ports the compiler test cases to new rust_intrinsic format) - rust-lang#138570 (add `naked_functions_target_feature` unstable feature) - rust-lang#138623 ([bootstrap] Use llvm_runtimes for compiler-rt) - rust-lang#138627 (Autodiff cleanups) - rust-lang#138669 (tests: accept some noise from LLVM 21 in symbols-all-mangled) - rust-lang#138706 (Improve bootstrap git modified path handling) - rust-lang#138709 (Update GCC submodule) - rust-lang#138717 (Add an attribute that makes the spans from a macro edition 2021, and fix pin on edition 2024 with it) - rust-lang#138721 (Use explicit cpu in some asm and codegen tests.) - rust-lang#138728 (Update `compiler-builtins` to 0.1.152) r? `@ghost` `@rustbot` modify labels: rollup try-job: aarch64-apple try-job: x86_64-msvc-1 try-job: x86_64-gnu try-job: dist-i586-gnu-i586-i686-musl
2 parents 4ac032f + 3ec7f85 commit eadc761

File tree

46 files changed

+464
-311
lines changed

Some content is hidden

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

46 files changed

+464
-311
lines changed
 

‎compiler/rustc_attr_data_structures/src/attributes.rs

+1
Original file line numberDiff line numberDiff line change
@@ -191,6 +191,7 @@ pub enum AttributeKind {
191191
},
192192
MacroTransparency(Transparency),
193193
Repr(ThinVec<(ReprAttr, Span)>),
194+
RustcMacroEdition2021,
194195
Stability {
195196
stability: Stability,
196197
/// Span of the `#[stable(...)]` or `#[unstable(...)]` attribute

‎compiler/rustc_attr_data_structures/src/lib.rs

+4-7
Original file line numberDiff line numberDiff line change
@@ -182,21 +182,18 @@ macro_rules! find_attr {
182182
}};
183183

184184
($attributes_list: expr, $pattern: pat $(if $guard: expr)? => $e: expr) => {{
185-
fn check_attribute_iterator<'a>(_: &'_ impl IntoIterator<Item = &'a rustc_hir::Attribute>) {}
186-
check_attribute_iterator(&$attributes_list);
187-
188-
let find_attribute = |iter| {
185+
'done: {
189186
for i in $attributes_list {
187+
let i: &rustc_hir::Attribute = i;
190188
match i {
191189
rustc_hir::Attribute::Parsed($pattern) $(if $guard)? => {
192-
return Some($e);
190+
break 'done Some($e);
193191
}
194192
_ => {}
195193
}
196194
}
197195

198196
None
199-
};
200-
find_attribute($attributes_list)
197+
}
201198
}};
202199
}

0 commit comments

Comments
 (0)