about summary refs log tree commit diff
path: root/compiler/rustc_passes/src
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2025-04-25 18:51:15 +0000
committerbors <bors@rust-lang.org>2025-04-25 18:51:15 +0000
commitb4c8b0c3f0533bb342a4873ff59bdad3883ab8e3 (patch)
treeeef1aa90a79b32d1ea165af6b54170a3ca6c0468 /compiler/rustc_passes/src
parente3e432d4d65a55e6db167598e96db2bcb163e316 (diff)
parent99dc43b7178445e3e7eacd10630dfbfadefab560 (diff)
downloadrust-b4c8b0c3f0533bb342a4873ff59bdad3883ab8e3.tar.gz
rust-b4c8b0c3f0533bb342a4873ff59bdad3883ab8e3.zip
Auto merge of #140298 - matthiaskrgr:rollup-5tc1gvb, r=matthiaskrgr
Rollup of 8 pull requests

Successful merges:

 - #137683 (Add a tidy check for GCC submodule version)
 - #138968 (Update the index of Result to make the summary more comprehensive)
 - #139572 (docs(std): mention const blocks in const keyword doc page)
 - #140152 (Unify the format of rustc cli flags)
 - #140193 (fix ICE in `#[naked]` attribute validation)
 - #140205 (Tidying up UI tests [2/N])
 - #140284 (remove expect() in `unnecessary_transmutes`)
 - #140290 (rustdoc: fix typo change from equivelent to equivalent)

r? `@ghost`
`@rustbot` modify labels: rollup
Diffstat (limited to 'compiler/rustc_passes/src')
-rw-r--r--compiler/rustc_passes/src/check_attr.rs6
-rw-r--r--compiler/rustc_passes/src/errors.rs2
2 files changed, 6 insertions, 2 deletions
diff --git a/compiler/rustc_passes/src/check_attr.rs b/compiler/rustc_passes/src/check_attr.rs
index cfc71a412be..7a27bc5c387 100644
--- a/compiler/rustc_passes/src/check_attr.rs
+++ b/compiler/rustc_passes/src/check_attr.rs
@@ -680,10 +680,14 @@ impl<'tcx> CheckAttrVisitor<'tcx> {
                     }
 
                     if !other_attr.has_any_name(ALLOW_LIST) {
+                        let path = other_attr.path();
+                        let path: Vec<_> = path.iter().map(|s| s.as_str()).collect();
+                        let other_attr_name = path.join("::");
+
                         self.dcx().emit_err(errors::NakedFunctionIncompatibleAttribute {
                             span: other_attr.span(),
                             naked_span: attr.span(),
-                            attr: other_attr.name().unwrap(),
+                            attr: other_attr_name,
                         });
 
                         return;
diff --git a/compiler/rustc_passes/src/errors.rs b/compiler/rustc_passes/src/errors.rs
index 4052264b051..b1b4b9ee927 100644
--- a/compiler/rustc_passes/src/errors.rs
+++ b/compiler/rustc_passes/src/errors.rs
@@ -1249,7 +1249,7 @@ pub(crate) struct NakedFunctionIncompatibleAttribute {
     pub span: Span,
     #[label(passes_naked_attribute)]
     pub naked_span: Span,
-    pub attr: Symbol,
+    pub attr: String,
 }
 
 #[derive(Diagnostic)]