diff options
| author | bors <bors@rust-lang.org> | 2024-07-27 06:32:36 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2024-07-27 06:32:36 +0000 |
| commit | a6796c10a1e84b83d2f3c1eea8ea71c995290deb (patch) | |
| tree | 2e3af61e9cf97e5c33567d517ba2f5d53a1d2e64 /compiler/rustc_resolve | |
| parent | adbb89e238640c3d3279ef3efb86c7bf46295858 (diff) | |
| parent | 822286f0758bea84b798e494b5b6103d288a3221 (diff) | |
| download | rust-a6796c10a1e84b83d2f3c1eea8ea71c995290deb.tar.gz rust-a6796c10a1e84b83d2f3c1eea8ea71c995290deb.zip | |
Auto merge of #3768 - rust-lang:rustup-2024-07-27, r=RalfJung
Automatic Rustup
Diffstat (limited to 'compiler/rustc_resolve')
| -rw-r--r-- | compiler/rustc_resolve/src/diagnostics.rs | 5 | ||||
| -rw-r--r-- | compiler/rustc_resolve/src/errors.rs | 2 |
2 files changed, 5 insertions, 2 deletions
diff --git a/compiler/rustc_resolve/src/diagnostics.rs b/compiler/rustc_resolve/src/diagnostics.rs index 046ae5fc593..df80f4df5b9 100644 --- a/compiler/rustc_resolve/src/diagnostics.rs +++ b/compiler/rustc_resolve/src/diagnostics.rs @@ -1448,7 +1448,10 @@ impl<'a, 'tcx> Resolver<'a, 'tcx> { ); if macro_kind == MacroKind::Bang && ident.name == sym::macro_rules { - err.subdiagnostic(MaybeMissingMacroRulesName { span: ident.span }); + let label_span = ident.span.shrink_to_hi(); + let mut spans = MultiSpan::from_span(label_span); + spans.push_span_label(label_span, "put a macro name here"); + err.subdiagnostic(MaybeMissingMacroRulesName { spans: spans }); return; } diff --git a/compiler/rustc_resolve/src/errors.rs b/compiler/rustc_resolve/src/errors.rs index 0a68231c6fe..698147765b3 100644 --- a/compiler/rustc_resolve/src/errors.rs +++ b/compiler/rustc_resolve/src/errors.rs @@ -669,7 +669,7 @@ pub(crate) struct MacroSuggMovePosition { #[note(resolve_missing_macro_rules_name)] pub(crate) struct MaybeMissingMacroRulesName { #[primary_span] - pub(crate) span: Span, + pub(crate) spans: MultiSpan, } #[derive(Subdiagnostic)] |
