From 744c50315dc52cd6d9f09b80561c936afa2b3b96 Mon Sep 17 00:00:00 2001 From: Guillaume Gomez Date: Mon, 9 Mar 2026 12:12:30 +0100 Subject: [PATCH] Add missing `Diag::with_span_suggestion_with_style` method --- compiler/rustc_errors/src/diagnostic.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/compiler/rustc_errors/src/diagnostic.rs b/compiler/rustc_errors/src/diagnostic.rs index 2aac669d744a..18f1af36b620 100644 --- a/compiler/rustc_errors/src/diagnostic.rs +++ b/compiler/rustc_errors/src/diagnostic.rs @@ -934,6 +934,7 @@ pub fn span_suggestion( self } } + with_fn! { with_span_suggestion_with_style, /// [`Diag::span_suggestion()`] but you can set the [`SuggestionStyle`]. pub fn span_suggestion_with_style( &mut self, @@ -956,7 +957,7 @@ pub fn span_suggestion_with_style( applicability, }); self - } + } } with_fn! { with_span_suggestion_verbose, /// Always show the suggested change.