about summary refs log tree commit diff
path: root/compiler/rustc_errors/src
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2025-08-11 02:59:13 +0000
committerbors <bors@rust-lang.org>2025-08-11 02:59:13 +0000
commit53af067bb0b4edf9b5394e5f9b60942974b9fbc2 (patch)
treeab63cb5b1450d8229165c3eb5ae7e3995d8c1223 /compiler/rustc_errors/src
parent21a19c297d4f5a03501d92ca251bd7a17073c08a (diff)
parentfd7d7245594a1c819333cbc4f981ae51ee78930d (diff)
downloadrust-53af067bb0b4edf9b5394e5f9b60942974b9fbc2.tar.gz
rust-53af067bb0b4edf9b5394e5f9b60942974b9fbc2.zip
Auto merge of #145236 - Zalathar:rollup-1ggbztv, r=Zalathar
Rollup of 7 pull requests

Successful merges:

 - rust-lang/rust#143949 (Constify remaining traits/impls for `const_ops`)
 - rust-lang/rust#144330 (document assumptions about `Clone` and `Eq` traits)
 - rust-lang/rust#144350 (std: sys: io: io_slice: Add UEFI types)
 - rust-lang/rust#144558 (Point at the `Fn()` or `FnMut()` bound that coerced a closure, which caused a move error)
 - rust-lang/rust#145149 (Make config method invoke inside parse use dwn_ctx)
 - rust-lang/rust#145227 (Tweak spans providing type context on errors when involving macros)
 - rust-lang/rust#145228 (Remove unnecessary parentheses in `assert!`s)

r? `@ghost`
`@rustbot` modify labels: rollup
Diffstat (limited to 'compiler/rustc_errors/src')
-rw-r--r--compiler/rustc_errors/src/diagnostic.rs7
1 files changed, 4 insertions, 3 deletions
diff --git a/compiler/rustc_errors/src/diagnostic.rs b/compiler/rustc_errors/src/diagnostic.rs
index 5a5563c7bb2..98be37fd84b 100644
--- a/compiler/rustc_errors/src/diagnostic.rs
+++ b/compiler/rustc_errors/src/diagnostic.rs
@@ -847,17 +847,18 @@ impl<'a, G: EmissionGuarantee> Diag<'a, G> {
         self
     }
 
+    with_fn! { with_span_help,
     /// Prints the span with some help above it.
     /// This is like [`Diag::help()`], but it gets its own span.
     #[rustc_lint_diagnostics]
-    pub fn span_help<S: Into<MultiSpan>>(
+    pub fn span_help(
         &mut self,
-        sp: S,
+        sp: impl Into<MultiSpan>,
         msg: impl Into<SubdiagMessage>,
     ) -> &mut Self {
         self.sub(Level::Help, msg, sp.into());
         self
-    }
+    } }
 
     /// Disallow attaching suggestions to this diagnostic.
     /// Any suggestions attached e.g. with the `span_suggestion_*` methods