From 8f286dbf27b61afdd96f632d0bc7f4c49fbb7d0f Mon Sep 17 00:00:00 2001 From: Eduard-Mihai Burtescu Date: Fri, 13 Dec 2019 23:21:14 +0200 Subject: [PATCH 1/6] rustc_errors: split macro backtrace rendering from <*macros> hacks. --- .../annotate_snippet_emitter_writer.rs | 2 +- src/librustc_errors/emitter.rs | 154 +++++++++++------- src/librustc_span/source_map.rs | 8 - 3 files changed, 97 insertions(+), 67 deletions(-) diff --git a/src/librustc_errors/annotate_snippet_emitter_writer.rs b/src/librustc_errors/annotate_snippet_emitter_writer.rs index 009ab6ac5b12f..65d82f545e8f0 100644 --- a/src/librustc_errors/annotate_snippet_emitter_writer.rs +++ b/src/librustc_errors/annotate_snippet_emitter_writer.rs @@ -32,7 +32,7 @@ impl Emitter for AnnotateSnippetEmitterWriter { let mut children = diag.children.clone(); let (mut primary_span, suggestions) = self.primary_span_formatted(&diag); - self.fix_multispans_in_std_macros( + self.render_multispans_macro_backtrace_and_fix_extern_macros( &self.source_map, &mut primary_span, &mut children, diff --git a/src/librustc_errors/emitter.rs b/src/librustc_errors/emitter.rs index 1fcb36a2a3090..d32b8c689dc1d 100644 --- a/src/librustc_errors/emitter.rs +++ b/src/librustc_errors/emitter.rs @@ -280,10 +280,7 @@ pub trait Emitter { } } - // This does a small "fix" for multispans by looking to see if it can find any that - // point directly at <*macros>. Since these are often difficult to read, this - // will change the span to point at the use site. - fn fix_multispans_in_std_macros( + fn render_multispans_macro_backtrace_and_fix_extern_macros( &self, source_map: &Option>, span: &mut MultiSpan, @@ -291,61 +288,64 @@ pub trait Emitter { level: &Level, backtrace: bool, ) { - let mut spans_updated = self.fix_multispan_in_std_macros(source_map, span, backtrace); - for child in children.iter_mut() { - spans_updated |= - self.fix_multispan_in_std_macros(source_map, &mut child.span, backtrace); + self.render_multispans_macro_backtrace(source_map, span, children, backtrace); + + if !backtrace { + if self.fix_multispans_in_extern_macros(source_map, span, children) { + let msg = if level == &Error { + "this error originates in a macro outside of the current crate \ + (in Nightly builds, run with -Z external-macro-backtrace \ + for more info)" + .to_string() + } else { + "this warning originates in a macro outside of the current crate \ + (in Nightly builds, run with -Z external-macro-backtrace \ + for more info)" + .to_string() + }; + + children.push(SubDiagnostic { + level: Level::Note, + message: vec![(msg, Style::NoStyle)], + span: MultiSpan::new(), + render_span: None, + }); + } } - let msg = if level == &Error { - "this error originates in a macro outside of the current crate \ - (in Nightly builds, run with -Z external-macro-backtrace \ - for more info)" - .to_string() - } else { - "this warning originates in a macro outside of the current crate \ - (in Nightly builds, run with -Z external-macro-backtrace \ - for more info)" - .to_string() - }; + } - if spans_updated { - children.push(SubDiagnostic { - level: Level::Note, - message: vec![(msg, Style::NoStyle)], - span: MultiSpan::new(), - render_span: None, - }); + fn render_multispans_macro_backtrace( + &self, + source_map: &Option>, + span: &mut MultiSpan, + children: &mut Vec, + backtrace: bool, + ) { + self.render_multispan_macro_backtrace(source_map, span, backtrace); + for child in children.iter_mut() { + self.render_multispan_macro_backtrace(source_map, &mut child.span, backtrace); } } - // This "fixes" MultiSpans that contain Spans that are pointing to locations inside of - // <*macros>. Since these locations are often difficult to read, we move these Spans from - // <*macros> to their corresponding use site. - fn fix_multispan_in_std_macros( + fn render_multispan_macro_backtrace( &self, source_map: &Option>, span: &mut MultiSpan, always_backtrace: bool, - ) -> bool { + ) { let sm = match source_map { Some(ref sm) => sm, - None => return false, + None => return, }; - let mut before_after: Vec<(Span, Span)> = vec![]; let mut new_labels: Vec<(Span, String)> = vec![]; // First, find all the spans in <*macros> and point instead at their use site - for sp in span.primary_spans() { + for &sp in span.primary_spans() { if sp.is_dummy() { continue; } - let call_sp = sm.call_span_if_macro(*sp); - if call_sp != *sp && !always_backtrace { - before_after.push((*sp, call_sp)); - } let macro_backtrace: Vec<_> = sp.macro_backtrace().collect(); - let backtrace_len = macro_backtrace.len(); for (i, trace) in macro_backtrace.iter().rev().enumerate() { // Only show macro locations that are local // and display them like a span_note @@ -358,13 +358,13 @@ pub trait Emitter { format!( "in this expansion of `{}`{}", trace.kind.descr(), - if backtrace_len > 2 { - // if backtrace_len == 1 it'll be pointed - // at by "in this macro invocation" + if macro_backtrace.len() > 2 { + // if macro_backtrace.len() == 1 it'll be + // pointed at by "in this macro invocation" format!(" (#{})", i + 1) } else { String::new() - } + }, ), )); } @@ -377,13 +377,13 @@ pub trait Emitter { trace.call_site, format!( "in this macro invocation{}", - if backtrace_len > 2 && always_backtrace { + if macro_backtrace.len() > 2 && always_backtrace { // only specify order when the macro // backtrace is multiple levels deep format!(" (#{})", i + 1) } else { String::new() - } + }, ), )); if !always_backtrace { @@ -395,20 +395,58 @@ pub trait Emitter { for (label_span, label_text) in new_labels { span.push_span_label(label_span, label_text); } - for sp_label in span.span_labels() { - if sp_label.span.is_dummy() { - continue; - } - if sm.span_to_filename(sp_label.span.clone()).is_macros() && !always_backtrace { - if let Some(use_site) = sp_label.span.macro_backtrace().last() { - before_after.push((sp_label.span, use_site.call_site)); - } - } + } + + // This does a small "fix" for multispans by looking to see if it can find any that + // point directly at <*macros>. Since these are often difficult to read, this + // will change the span to point at the use site. + fn fix_multispans_in_extern_macros( + &self, + source_map: &Option>, + span: &mut MultiSpan, + children: &mut Vec, + ) -> bool { + let mut spans_updated = self.fix_multispan_in_extern_macros(source_map, span); + for child in children.iter_mut() { + spans_updated |= self.fix_multispan_in_extern_macros(source_map, &mut child.span); } + spans_updated + } + + // This "fixes" MultiSpans that contain Spans that are pointing to locations inside of + // <*macros>. Since these locations are often difficult to read, we move these Spans from + // <*macros> to their corresponding use site. + fn fix_multispan_in_extern_macros( + &self, + source_map: &Option>, + span: &mut MultiSpan, + ) -> bool { + let sm = match source_map { + Some(ref sm) => sm, + None => return false, + }; + + // First, find all the spans in <*macros> and point instead at their use site + let replacements: Vec<(Span, Span)> = span + .primary_spans() + .iter() + .copied() + .chain(span.span_labels().iter().map(|sp_label| sp_label.span)) + .filter_map(|sp| { + if !sp.is_dummy() && sm.span_to_filename(sp).is_macros() { + let maybe_callsite = sp.source_callsite(); + if sp != maybe_callsite { + return Some((sp, maybe_callsite)); + } + } + None + }) + .collect(); + // After we have them, make sure we replace these 'bad' def sites with their use sites - let spans_updated = !before_after.is_empty(); - for (before, after) in before_after { - span.replace(before, after); + let spans_updated = !replacements.is_empty(); + for (from, to) in replacements { + span.replace(from, to); } spans_updated @@ -424,7 +462,7 @@ impl Emitter for EmitterWriter { let mut children = diag.children.clone(); let (mut primary_span, suggestions) = self.primary_span_formatted(&diag); - self.fix_multispans_in_std_macros( + self.render_multispans_macro_backtrace_and_fix_extern_macros( &self.sm, &mut primary_span, &mut children, diff --git a/src/librustc_span/source_map.rs b/src/librustc_span/source_map.rs index c250df43a2733..45c4d6dbc6cf4 100644 --- a/src/librustc_span/source_map.rs +++ b/src/librustc_span/source_map.rs @@ -945,14 +945,6 @@ impl SourceMap { _ => None, }) } - pub fn call_span_if_macro(&self, sp: Span) -> Span { - if self.span_to_filename(sp.clone()).is_macros() { - if let Some(use_site) = sp.macro_backtrace().last() { - return use_site.call_site; - } - } - sp - } } #[derive(Clone)] From f6fc80206e9600ae753cdfbd762fb982afca48b0 Mon Sep 17 00:00:00 2001 From: Eduard-Mihai Burtescu Date: Sun, 15 Dec 2019 17:12:30 +0200 Subject: [PATCH 2/6] rustc: rename -Zexternal-macro-backtrace to -Zmacro-backtrace. --- src/bootstrap/builder.rs | 8 +++++- .../annotate_snippet_emitter_writer.rs | 8 +++--- src/librustc_errors/emitter.rs | 28 +++++++------------ src/librustc_errors/json.rs | 22 ++++++--------- src/librustc_errors/lib.rs | 8 +++--- src/librustc_session/config.rs | 2 +- src/librustc_session/options.rs | 4 +-- src/librustc_session/session.rs | 12 ++++---- .../borrowck-borrowed-uniq-rvalue-2.stderr | 2 +- src/test/ui/borrowck/issue-64453.stderr | 2 +- .../ui/codemap_tests/bad-format-args.stderr | 2 +- .../const-eval/const_fn_ptr_fail2.stderr | 4 +-- .../ui/consts/const-eval/const_panic.stderr | 6 ++-- .../const-eval/const_panic_libcore.stderr | 6 ++-- .../const_panic_libcore_main.stderr | 6 ++-- .../feature-gate-const_panic.stderr | 6 ++-- .../const-eval/panic-assoc-never-type.stderr | 2 +- .../consts/const-eval/panic-never-type.stderr | 2 +- .../const-external-macro-const-err.stderr | 2 +- .../ui/consts/control-flow/assert.both.stderr | 2 +- .../control-flow/assert.if_match.stderr | 4 +-- .../control-flow/issue-50577.if_match.stderr | 2 +- .../control-flow/issue-50577.stock.stderr | 8 +++--- .../control-flow/short-circuit.stock.stderr | 4 +-- .../min_const_fn/bad_const_fn_body_ice.stderr | 2 +- .../cross-crate-macro-backtrace/main.stderr | 2 +- .../ui/deprecation/deprecation-lint-2.stderr | 2 +- .../ui/deprecation/deprecation-lint-3.stderr | 2 +- src/test/ui/deref-suggestion.stderr | 2 +- .../ui/editions/edition-imports-2015.stderr | 2 +- .../ui/editions/edition-imports-2018.stderr | 2 +- .../edition-imports-virtual-2015-gated.stderr | 2 +- ...dition-keywords-2015-2018-expansion.stderr | 2 +- ...dition-keywords-2018-2018-expansion.stderr | 2 +- src/test/ui/hygiene/intercrate.stderr | 2 +- .../ui/hygiene/no_implicit_prelude.stderr | 2 +- src/test/ui/imports/import-crate-var.stderr | 2 +- .../internal/internal-unstable-noallow.stderr | 8 +++--- src/test/ui/issues/issue-13446.stderr | 2 +- src/test/ui/issues/issue-16966.stderr | 2 +- src/test/ui/issues/issue-2150.stderr | 2 +- src/test/ui/issues/issue-32829.stderr | 2 +- src/test/ui/issues/issue-34334.stderr | 2 +- src/test/ui/issues/issue-59488.stderr | 6 ++-- .../lifetimes/borrowck-let-suggestion.stderr | 2 +- src/test/ui/lint/lint-stability2.stderr | 2 +- src/test/ui/lint/lint-stability3.stderr | 2 +- src/test/ui/macro_backtrace/main.rs | 2 +- src/test/ui/macros/assert.stderr | 2 +- src/test/ui/macros/format-parse-errors.stderr | 2 +- .../macros/macro-local-data-key-priv.stderr | 2 +- .../ui/macros/must-use-in-macro-55516.stderr | 2 +- .../match/match-arm-resolving-to-never.stderr | 2 +- .../method-on-ambiguous-numeric-type.stderr | 2 +- .../feature-gate-never_type_fallback.stderr | 2 +- .../never_type/never-assign-dead-code.stderr | 2 +- src/test/ui/out-of-order-shadowing.stderr | 2 +- .../ui/privacy/private-inferred-type-3.stderr | 14 +++++----- src/test/ui/proc-macro/dollar-crate.stderr | 2 +- src/test/ui/reachable/expr_again.stderr | 2 +- src/test/ui/reachable/expr_block.stderr | 2 +- src/test/ui/reachable/expr_if.stderr | 2 +- src/test/ui/reachable/expr_loop.stderr | 6 ++-- src/test/ui/reachable/expr_match.stderr | 4 +-- .../regions-var-type-out-of-scope.stderr | 2 +- .../dbg-macro-move-semantics.stderr | 2 +- .../dbg-macro-requires-debug.stderr | 2 +- src/test/ui/span/coerce-suggestions.stderr | 2 +- src/test/ui/span/issue-33884.stderr | 2 +- src/test/ui/span/slice-borrow.stderr | 2 +- ...gest-deref-inside-macro-issue-58298.stderr | 2 +- .../dont-suggest-try_into-in-macros.stderr | 2 +- .../mut-borrow-needed-by-trait.stderr | 2 +- .../suggestions/vec-macro-in-pattern.stderr | 2 +- .../ui/try-block/try-block-opt-init.stderr | 2 +- .../ui/type/ascription/issue-47666.stderr | 2 +- .../cannot_infer_local_or_vec.stderr | 2 +- ...cannot_infer_local_or_vec_in_tuples.stderr | 2 +- src/test/ui/unreachable-code-ret.stderr | 2 +- 79 files changed, 141 insertions(+), 149 deletions(-) diff --git a/src/bootstrap/builder.rs b/src/bootstrap/builder.rs index 18f6fda760846..d12ee2935ebf5 100644 --- a/src/bootstrap/builder.rs +++ b/src/bootstrap/builder.rs @@ -847,7 +847,13 @@ impl<'a> Builder<'a> { rustflags.arg("-Zforce-unstable-if-unmarked"); } - rustflags.arg("-Zexternal-macro-backtrace"); + // cfg(bootstrap): the flag was renamed from `-Zexternal-macro-backtrace` + // to `-Zmacro-backtrace`, keep only the latter after beta promotion. + if stage == 0 { + rustflags.arg("-Zexternal-macro-backtrace"); + } else { + rustflags.arg("-Zmacro-backtrace"); + } let want_rustdoc = self.doc_tests != DocTests::No; diff --git a/src/librustc_errors/annotate_snippet_emitter_writer.rs b/src/librustc_errors/annotate_snippet_emitter_writer.rs index 65d82f545e8f0..1eda1c9200f6e 100644 --- a/src/librustc_errors/annotate_snippet_emitter_writer.rs +++ b/src/librustc_errors/annotate_snippet_emitter_writer.rs @@ -23,7 +23,7 @@ pub struct AnnotateSnippetEmitterWriter { /// If true, will normalize line numbers with `LL` to prevent noise in UI test diffs. ui_testing: bool, - external_macro_backtrace: bool, + macro_backtrace: bool, } impl Emitter for AnnotateSnippetEmitterWriter { @@ -37,7 +37,7 @@ impl Emitter for AnnotateSnippetEmitterWriter { &mut primary_span, &mut children, &diag.level, - self.external_macro_backtrace, + self.macro_backtrace, ); self.emit_messages_default( @@ -172,9 +172,9 @@ impl AnnotateSnippetEmitterWriter { pub fn new( source_map: Option>, short_message: bool, - external_macro_backtrace: bool, + macro_backtrace: bool, ) -> Self { - Self { source_map, short_message, ui_testing: false, external_macro_backtrace } + Self { source_map, short_message, ui_testing: false, macro_backtrace } } /// Allows to modify `Self` to enable or disable the `ui_testing` flag. diff --git a/src/librustc_errors/emitter.rs b/src/librustc_errors/emitter.rs index d32b8c689dc1d..59493b4a683b0 100644 --- a/src/librustc_errors/emitter.rs +++ b/src/librustc_errors/emitter.rs @@ -54,19 +54,11 @@ impl HumanReadableErrorType { source_map: Option>, teach: bool, terminal_width: Option, - external_macro_backtrace: bool, + macro_backtrace: bool, ) -> EmitterWriter { let (short, color_config) = self.unzip(); let color = color_config.suggests_using_colors(); - EmitterWriter::new( - dst, - source_map, - short, - teach, - color, - terminal_width, - external_macro_backtrace, - ) + EmitterWriter::new(dst, source_map, short, teach, color, terminal_width, macro_backtrace) } } @@ -294,12 +286,12 @@ pub trait Emitter { if self.fix_multispans_in_extern_macros(source_map, span, children) { let msg = if level == &Error { "this error originates in a macro outside of the current crate \ - (in Nightly builds, run with -Z external-macro-backtrace \ + (in Nightly builds, run with -Z macro-backtrace \ for more info)" .to_string() } else { "this warning originates in a macro outside of the current crate \ - (in Nightly builds, run with -Z external-macro-backtrace \ + (in Nightly builds, run with -Z macro-backtrace \ for more info)" .to_string() }; @@ -467,7 +459,7 @@ impl Emitter for EmitterWriter { &mut primary_span, &mut children, &diag.level, - self.external_macro_backtrace, + self.macro_backtrace, ); self.emit_messages_default( @@ -546,7 +538,7 @@ pub struct EmitterWriter { ui_testing: bool, terminal_width: Option, - external_macro_backtrace: bool, + macro_backtrace: bool, } #[derive(Debug)] @@ -563,7 +555,7 @@ impl EmitterWriter { short_message: bool, teach: bool, terminal_width: Option, - external_macro_backtrace: bool, + macro_backtrace: bool, ) -> EmitterWriter { let dst = Destination::from_stderr(color_config); EmitterWriter { @@ -573,7 +565,7 @@ impl EmitterWriter { teach, ui_testing: false, terminal_width, - external_macro_backtrace, + macro_backtrace, } } @@ -584,7 +576,7 @@ impl EmitterWriter { teach: bool, colored: bool, terminal_width: Option, - external_macro_backtrace: bool, + macro_backtrace: bool, ) -> EmitterWriter { EmitterWriter { dst: Raw(dst, colored), @@ -593,7 +585,7 @@ impl EmitterWriter { teach, ui_testing: false, terminal_width, - external_macro_backtrace, + macro_backtrace, } } diff --git a/src/librustc_errors/json.rs b/src/librustc_errors/json.rs index 3ddf9b09893ba..ffdff6acec5de 100644 --- a/src/librustc_errors/json.rs +++ b/src/librustc_errors/json.rs @@ -36,7 +36,7 @@ pub struct JsonEmitter { pretty: bool, ui_testing: bool, json_rendered: HumanReadableErrorType, - external_macro_backtrace: bool, + macro_backtrace: bool, } impl JsonEmitter { @@ -45,7 +45,7 @@ impl JsonEmitter { source_map: Lrc, pretty: bool, json_rendered: HumanReadableErrorType, - external_macro_backtrace: bool, + macro_backtrace: bool, ) -> JsonEmitter { JsonEmitter { dst: Box::new(io::stderr()), @@ -54,14 +54,14 @@ impl JsonEmitter { pretty, ui_testing: false, json_rendered, - external_macro_backtrace, + macro_backtrace, } } pub fn basic( pretty: bool, json_rendered: HumanReadableErrorType, - external_macro_backtrace: bool, + macro_backtrace: bool, ) -> JsonEmitter { let file_path_mapping = FilePathMapping::empty(); JsonEmitter::stderr( @@ -69,7 +69,7 @@ impl JsonEmitter { Lrc::new(SourceMap::new(file_path_mapping)), pretty, json_rendered, - external_macro_backtrace, + macro_backtrace, ) } @@ -79,7 +79,7 @@ impl JsonEmitter { source_map: Lrc, pretty: bool, json_rendered: HumanReadableErrorType, - external_macro_backtrace: bool, + macro_backtrace: bool, ) -> JsonEmitter { JsonEmitter { dst, @@ -88,7 +88,7 @@ impl JsonEmitter { pretty, ui_testing: false, json_rendered, - external_macro_backtrace, + macro_backtrace, } } @@ -245,13 +245,7 @@ impl Diagnostic { let buf = BufWriter::default(); let output = buf.clone(); je.json_rendered - .new_emitter( - Box::new(buf), - Some(je.sm.clone()), - false, - None, - je.external_macro_backtrace, - ) + .new_emitter(Box::new(buf), Some(je.sm.clone()), false, None, je.macro_backtrace) .ui_testing(je.ui_testing) .emit_diagnostic(diag); let output = Arc::try_unwrap(output.0).unwrap().into_inner().unwrap(); diff --git a/src/librustc_errors/lib.rs b/src/librustc_errors/lib.rs index 17b293401f89e..97667febc3ca2 100644 --- a/src/librustc_errors/lib.rs +++ b/src/librustc_errors/lib.rs @@ -336,9 +336,9 @@ pub struct HandlerFlags { /// If true, immediately print bugs registered with `delay_span_bug`. /// (rustc: see `-Z report-delayed-bugs`) pub report_delayed_bugs: bool, - /// show macro backtraces even for non-local macros. - /// (rustc: see `-Z external-macro-backtrace`) - pub external_macro_backtrace: bool, + /// Show macro backtraces. + /// (rustc: see `-Z macro-backtrace`) + pub macro_backtrace: bool, /// If true, identical diagnostics are reported only once. pub deduplicate_diagnostics: bool, } @@ -385,7 +385,7 @@ impl Handler { false, false, None, - flags.external_macro_backtrace, + flags.macro_backtrace, )); Self::with_emitter_and_flags(emitter, flags) } diff --git a/src/librustc_session/config.rs b/src/librustc_session/config.rs index ad1a6c4906ea3..75b5e37b2df69 100644 --- a/src/librustc_session/config.rs +++ b/src/librustc_session/config.rs @@ -624,7 +624,7 @@ impl DebuggingOptions { treat_err_as_bug: self.treat_err_as_bug, dont_buffer_diagnostics: self.dont_buffer_diagnostics, report_delayed_bugs: self.report_delayed_bugs, - external_macro_backtrace: self.external_macro_backtrace, + macro_backtrace: self.macro_backtrace, deduplicate_diagnostics: self.deduplicate_diagnostics.unwrap_or(true), } } diff --git a/src/librustc_session/options.rs b/src/librustc_session/options.rs index d6b71641da52f..0250c40bcdcf1 100644 --- a/src/librustc_session/options.rs +++ b/src/librustc_session/options.rs @@ -776,8 +776,8 @@ options! {DebuggingOptions, DebuggingSetter, basic_debugging_options, "treat error number `val` that occurs as bug"), report_delayed_bugs: bool = (false, parse_bool, [TRACKED], "immediately print bugs registered with `delay_span_bug`"), - external_macro_backtrace: bool = (false, parse_bool, [UNTRACKED], - "show macro backtraces even for non-local macros"), + macro_backtrace: bool = (false, parse_bool, [UNTRACKED], + "show macro backtraces"), teach: bool = (false, parse_bool, [TRACKED], "show extended diagnostic help"), terminal_width: Option = (None, parse_opt_uint, [UNTRACKED], diff --git a/src/librustc_session/session.rs b/src/librustc_session/session.rs index 70984917d7ca2..648dd6ad32a6b 100644 --- a/src/librustc_session/session.rs +++ b/src/librustc_session/session.rs @@ -858,7 +858,7 @@ fn default_emitter( source_map: &Lrc, emitter_dest: Option>, ) -> Box { - let external_macro_backtrace = sopts.debugging_opts.external_macro_backtrace; + let macro_backtrace = sopts.debugging_opts.macro_backtrace; match (sopts.error_format, emitter_dest) { (config::ErrorOutputType::HumanReadable(kind), dst) => { let (short, color_config) = kind.unzip(); @@ -867,7 +867,7 @@ fn default_emitter( let emitter = AnnotateSnippetEmitterWriter::new( Some(source_map.clone()), short, - external_macro_backtrace, + macro_backtrace, ); Box::new(emitter.ui_testing(sopts.debugging_opts.ui_testing())) } else { @@ -878,7 +878,7 @@ fn default_emitter( short, sopts.debugging_opts.teach, sopts.debugging_opts.terminal_width, - external_macro_backtrace, + macro_backtrace, ), Some(dst) => EmitterWriter::new( dst, @@ -887,7 +887,7 @@ fn default_emitter( false, // no teach messages when writing to a buffer false, // no colors when writing to a buffer None, // no terminal width - external_macro_backtrace, + macro_backtrace, ), }; Box::new(emitter.ui_testing(sopts.debugging_opts.ui_testing())) @@ -899,7 +899,7 @@ fn default_emitter( source_map.clone(), pretty, json_rendered, - external_macro_backtrace, + macro_backtrace, ) .ui_testing(sopts.debugging_opts.ui_testing()), ), @@ -910,7 +910,7 @@ fn default_emitter( source_map.clone(), pretty, json_rendered, - external_macro_backtrace, + macro_backtrace, ) .ui_testing(sopts.debugging_opts.ui_testing()), ), diff --git a/src/test/ui/borrowck/borrowck-borrowed-uniq-rvalue-2.stderr b/src/test/ui/borrowck/borrowck-borrowed-uniq-rvalue-2.stderr index 1dd18c12fc8de..d0250d862fcc4 100644 --- a/src/test/ui/borrowck/borrowck-borrowed-uniq-rvalue-2.stderr +++ b/src/test/ui/borrowck/borrowck-borrowed-uniq-rvalue-2.stderr @@ -9,7 +9,7 @@ LL | x.x[0]; | ------ borrow later used here | = note: consider using a `let` binding to create a longer lived value - = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info) + = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z macro-backtrace for more info) error: aborting due to previous error diff --git a/src/test/ui/borrowck/issue-64453.stderr b/src/test/ui/borrowck/issue-64453.stderr index 0b66426aa2a0f..3a7f13f5bba8c 100644 --- a/src/test/ui/borrowck/issue-64453.stderr +++ b/src/test/ui/borrowck/issue-64453.stderr @@ -6,7 +6,7 @@ LL | static settings_dir: String = format!(""); | = note: for more information, see https://github.com/rust-lang/rust/issues/49146 = help: add `#![feature(const_if_match)]` to the crate attributes to enable - = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info) + = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z macro-backtrace for more info) error: aborting due to previous error diff --git a/src/test/ui/codemap_tests/bad-format-args.stderr b/src/test/ui/codemap_tests/bad-format-args.stderr index 17d4df2a22324..66ff9508db796 100644 --- a/src/test/ui/codemap_tests/bad-format-args.stderr +++ b/src/test/ui/codemap_tests/bad-format-args.stderr @@ -4,7 +4,7 @@ error: requires at least a format string argument LL | format!(); | ^^^^^^^^^^ | - = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info) + = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z macro-backtrace for more info) error: expected token: `,` --> $DIR/bad-format-args.rs:3:16 diff --git a/src/test/ui/consts/const-eval/const_fn_ptr_fail2.stderr b/src/test/ui/consts/const-eval/const_fn_ptr_fail2.stderr index f99505c30901d..15dd84fa7ed3f 100644 --- a/src/test/ui/consts/const-eval/const_fn_ptr_fail2.stderr +++ b/src/test/ui/consts/const-eval/const_fn_ptr_fail2.stderr @@ -12,7 +12,7 @@ LL | assert_eq!(Y, 4); | | | referenced constant has errors | - = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info) + = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z macro-backtrace for more info) error[E0080]: evaluation of constant expression failed --> $DIR/const_fn_ptr_fail2.rs:22:5 @@ -22,7 +22,7 @@ LL | assert_eq!(Z, 4); | | | referenced constant has errors | - = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info) + = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z macro-backtrace for more info) error: aborting due to 2 previous errors diff --git a/src/test/ui/consts/const-eval/const_panic.stderr b/src/test/ui/consts/const-eval/const_panic.stderr index 1b006c69cfd6e..bbbe70510306e 100644 --- a/src/test/ui/consts/const-eval/const_panic.stderr +++ b/src/test/ui/consts/const-eval/const_panic.stderr @@ -7,7 +7,7 @@ LL | pub const Z: () = panic!("cheese"); | the evaluated program panicked at 'cheese', $DIR/const_panic.rs:4:19 | = note: `#[deny(const_err)]` on by default - = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info) + = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z macro-backtrace for more info) error: any use of this value will cause an error --> $DIR/const_panic.rs:7:19 @@ -17,7 +17,7 @@ LL | pub const Y: () = unreachable!(); | | | the evaluated program panicked at 'internal error: entered unreachable code', $DIR/const_panic.rs:7:19 | - = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info) + = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z macro-backtrace for more info) error: any use of this value will cause an error --> $DIR/const_panic.rs:10:19 @@ -27,7 +27,7 @@ LL | pub const X: () = unimplemented!(); | | | the evaluated program panicked at 'not implemented', $DIR/const_panic.rs:10:19 | - = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info) + = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z macro-backtrace for more info) error: aborting due to 3 previous errors diff --git a/src/test/ui/consts/const-eval/const_panic_libcore.stderr b/src/test/ui/consts/const-eval/const_panic_libcore.stderr index abc844e984261..cedeabeadeb59 100644 --- a/src/test/ui/consts/const-eval/const_panic_libcore.stderr +++ b/src/test/ui/consts/const-eval/const_panic_libcore.stderr @@ -7,7 +7,7 @@ LL | const Z: () = panic!("cheese"); | the evaluated program panicked at 'cheese', $DIR/const_panic_libcore.rs:5:15 | = note: `#[deny(const_err)]` on by default - = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info) + = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z macro-backtrace for more info) error: any use of this value will cause an error --> $DIR/const_panic_libcore.rs:8:15 @@ -17,7 +17,7 @@ LL | const Y: () = unreachable!(); | | | the evaluated program panicked at 'internal error: entered unreachable code', $DIR/const_panic_libcore.rs:8:15 | - = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info) + = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z macro-backtrace for more info) error: any use of this value will cause an error --> $DIR/const_panic_libcore.rs:11:15 @@ -27,7 +27,7 @@ LL | const X: () = unimplemented!(); | | | the evaluated program panicked at 'not implemented', $DIR/const_panic_libcore.rs:11:15 | - = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info) + = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z macro-backtrace for more info) error: aborting due to 3 previous errors diff --git a/src/test/ui/consts/const-eval/const_panic_libcore_main.stderr b/src/test/ui/consts/const-eval/const_panic_libcore_main.stderr index 24ddefe01b5f9..3e8bea4d069ba 100644 --- a/src/test/ui/consts/const-eval/const_panic_libcore_main.stderr +++ b/src/test/ui/consts/const-eval/const_panic_libcore_main.stderr @@ -7,7 +7,7 @@ LL | const Z: () = panic!("cheese"); | the evaluated program panicked at 'cheese', $DIR/const_panic_libcore_main.rs:9:15 | = note: `#[deny(const_err)]` on by default - = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info) + = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z macro-backtrace for more info) error: any use of this value will cause an error --> $DIR/const_panic_libcore_main.rs:12:15 @@ -17,7 +17,7 @@ LL | const Y: () = unreachable!(); | | | the evaluated program panicked at 'internal error: entered unreachable code', $DIR/const_panic_libcore_main.rs:12:15 | - = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info) + = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z macro-backtrace for more info) error: any use of this value will cause an error --> $DIR/const_panic_libcore_main.rs:15:15 @@ -27,7 +27,7 @@ LL | const X: () = unimplemented!(); | | | the evaluated program panicked at 'not implemented', $DIR/const_panic_libcore_main.rs:15:15 | - = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info) + = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z macro-backtrace for more info) error: aborting due to 3 previous errors diff --git a/src/test/ui/consts/const-eval/feature-gate-const_panic.stderr b/src/test/ui/consts/const-eval/feature-gate-const_panic.stderr index ac0ff7025d1c0..e3b20e4147ab3 100644 --- a/src/test/ui/consts/const-eval/feature-gate-const_panic.stderr +++ b/src/test/ui/consts/const-eval/feature-gate-const_panic.stderr @@ -6,7 +6,7 @@ LL | const Z: () = panic!("cheese"); | = note: for more information, see https://github.com/rust-lang/rust/issues/51999 = help: add `#![feature(const_panic)]` to the crate attributes to enable - = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info) + = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z macro-backtrace for more info) error[E0658]: panicking in constants is unstable --> $DIR/feature-gate-const_panic.rs:9:15 @@ -16,7 +16,7 @@ LL | const X: () = unimplemented!(); | = note: for more information, see https://github.com/rust-lang/rust/issues/51999 = help: add `#![feature(const_panic)]` to the crate attributes to enable - = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info) + = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z macro-backtrace for more info) error[E0658]: panicking in constants is unstable --> $DIR/feature-gate-const_panic.rs:6:15 @@ -26,7 +26,7 @@ LL | const Y: () = unreachable!(); | = note: for more information, see https://github.com/rust-lang/rust/issues/51999 = help: add `#![feature(const_panic)]` to the crate attributes to enable - = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info) + = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z macro-backtrace for more info) error: aborting due to 3 previous errors diff --git a/src/test/ui/consts/const-eval/panic-assoc-never-type.stderr b/src/test/ui/consts/const-eval/panic-assoc-never-type.stderr index d09a295264c62..1cdbe6c887f6d 100644 --- a/src/test/ui/consts/const-eval/panic-assoc-never-type.stderr +++ b/src/test/ui/consts/const-eval/panic-assoc-never-type.stderr @@ -11,7 +11,7 @@ note: the lint level is defined here | LL | #![warn(const_err)] | ^^^^^^^^^ - = note: this warning originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info) + = note: this warning originates in a macro outside of the current crate (in Nightly builds, run with -Z macro-backtrace for more info) error[E0080]: erroneous constant used --> $DIR/panic-assoc-never-type.rs:16:13 diff --git a/src/test/ui/consts/const-eval/panic-never-type.stderr b/src/test/ui/consts/const-eval/panic-never-type.stderr index 3daad0a2fdd8c..ae142897b3704 100644 --- a/src/test/ui/consts/const-eval/panic-never-type.stderr +++ b/src/test/ui/consts/const-eval/panic-never-type.stderr @@ -11,7 +11,7 @@ note: the lint level is defined here | LL | #![warn(const_err)] | ^^^^^^^^^ - = note: this warning originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info) + = note: this warning originates in a macro outside of the current crate (in Nightly builds, run with -Z macro-backtrace for more info) error[E0080]: erroneous constant used --> $DIR/panic-never-type.rs:12:13 diff --git a/src/test/ui/consts/const-external-macro-const-err.stderr b/src/test/ui/consts/const-external-macro-const-err.stderr index 237c4d792c9ea..c3808391c7822 100644 --- a/src/test/ui/consts/const-external-macro-const-err.stderr +++ b/src/test/ui/consts/const-external-macro-const-err.stderr @@ -5,7 +5,7 @@ LL | static_assert!(2 + 2 == 5); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ index out of bounds: the len is 1 but the index is 1 | = note: `#[deny(const_err)]` on by default - = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info) + = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z macro-backtrace for more info) error: aborting due to previous error diff --git a/src/test/ui/consts/control-flow/assert.both.stderr b/src/test/ui/consts/control-flow/assert.both.stderr index 44769175f0ee9..e0e3df1193f55 100644 --- a/src/test/ui/consts/control-flow/assert.both.stderr +++ b/src/test/ui/consts/control-flow/assert.both.stderr @@ -7,7 +7,7 @@ LL | const _: () = assert!(false); | the evaluated program panicked at 'assertion failed: false', $DIR/assert.rs:12:15 | = note: `#[deny(const_err)]` on by default - = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info) + = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z macro-backtrace for more info) error: aborting due to previous error diff --git a/src/test/ui/consts/control-flow/assert.if_match.stderr b/src/test/ui/consts/control-flow/assert.if_match.stderr index 9c8963f6c7b28..3f4719b681cbd 100644 --- a/src/test/ui/consts/control-flow/assert.if_match.stderr +++ b/src/test/ui/consts/control-flow/assert.if_match.stderr @@ -6,7 +6,7 @@ LL | const _: () = assert!(true); | = note: for more information, see https://github.com/rust-lang/rust/issues/51999 = help: add `#![feature(const_panic)]` to the crate attributes to enable - = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info) + = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z macro-backtrace for more info) error[E0658]: panicking in constants is unstable --> $DIR/assert.rs:12:15 @@ -16,7 +16,7 @@ LL | const _: () = assert!(false); | = note: for more information, see https://github.com/rust-lang/rust/issues/51999 = help: add `#![feature(const_panic)]` to the crate attributes to enable - = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info) + = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z macro-backtrace for more info) error: aborting due to 2 previous errors diff --git a/src/test/ui/consts/control-flow/issue-50577.if_match.stderr b/src/test/ui/consts/control-flow/issue-50577.if_match.stderr index 6771224e6cf5e..5a7f10e2ee40a 100644 --- a/src/test/ui/consts/control-flow/issue-50577.if_match.stderr +++ b/src/test/ui/consts/control-flow/issue-50577.if_match.stderr @@ -9,7 +9,7 @@ LL | Drop = assert_eq!(1, 1) | = note: `if` expressions without `else` evaluate to `()` = help: consider adding an `else` block that evaluates to the expected type - = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info) + = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z macro-backtrace for more info) error: aborting due to previous error diff --git a/src/test/ui/consts/control-flow/issue-50577.stock.stderr b/src/test/ui/consts/control-flow/issue-50577.stock.stderr index 7d637f5aa9671..1eeda43b41c30 100644 --- a/src/test/ui/consts/control-flow/issue-50577.stock.stderr +++ b/src/test/ui/consts/control-flow/issue-50577.stock.stderr @@ -6,7 +6,7 @@ LL | Drop = assert_eq!(1, 1) | = note: for more information, see https://github.com/rust-lang/rust/issues/49146 = help: add `#![feature(const_if_match)]` to the crate attributes to enable - = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info) + = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z macro-backtrace for more info) error[E0658]: `if` is not allowed in a `const` --> $DIR/issue-50577.rs:7:16 @@ -16,7 +16,7 @@ LL | Drop = assert_eq!(1, 1) | = note: for more information, see https://github.com/rust-lang/rust/issues/49146 = help: add `#![feature(const_if_match)]` to the crate attributes to enable - = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info) + = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z macro-backtrace for more info) error[E0658]: `match` is not allowed in a `const` --> $DIR/issue-50577.rs:7:16 @@ -26,7 +26,7 @@ LL | Drop = assert_eq!(1, 1) | = note: for more information, see https://github.com/rust-lang/rust/issues/49146 = help: add `#![feature(const_if_match)]` to the crate attributes to enable - = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info) + = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z macro-backtrace for more info) error[E0317]: `if` may be missing an `else` clause --> $DIR/issue-50577.rs:7:16 @@ -39,7 +39,7 @@ LL | Drop = assert_eq!(1, 1) | = note: `if` expressions without `else` evaluate to `()` = help: consider adding an `else` block that evaluates to the expected type - = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info) + = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z macro-backtrace for more info) error: aborting due to 4 previous errors diff --git a/src/test/ui/consts/control-flow/short-circuit.stock.stderr b/src/test/ui/consts/control-flow/short-circuit.stock.stderr index cf0de929593db..6fcb7cafff284 100644 --- a/src/test/ui/consts/control-flow/short-circuit.stock.stderr +++ b/src/test/ui/consts/control-flow/short-circuit.stock.stderr @@ -7,7 +7,7 @@ LL | const _: bool = true || panic!(); | the evaluated program panicked at 'explicit panic', $DIR/short-circuit.rs:10:25 | = note: `#[deny(const_err)]` on by default - = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info) + = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z macro-backtrace for more info) error: any use of this value will cause an error --> $DIR/short-circuit.rs:11:26 @@ -17,7 +17,7 @@ LL | const _: bool = false && panic!(); | | | the evaluated program panicked at 'explicit panic', $DIR/short-circuit.rs:11:26 | - = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info) + = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z macro-backtrace for more info) error: aborting due to 2 previous errors diff --git a/src/test/ui/consts/min_const_fn/bad_const_fn_body_ice.stderr b/src/test/ui/consts/min_const_fn/bad_const_fn_body_ice.stderr index ecfd30e7b4439..9786e2e353cca 100644 --- a/src/test/ui/consts/min_const_fn/bad_const_fn_body_ice.stderr +++ b/src/test/ui/consts/min_const_fn/bad_const_fn_body_ice.stderr @@ -6,7 +6,7 @@ LL | vec![1, 2, 3] | = note: for more information, see issue https://github.com/rust-lang/rust/issues/57563 = help: add `#![feature(const_fn)]` to the crate attributes to enable - = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info) + = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z macro-backtrace for more info) error: aborting due to previous error diff --git a/src/test/ui/cross/cross-crate-macro-backtrace/main.stderr b/src/test/ui/cross/cross-crate-macro-backtrace/main.stderr index b6ebe0ff1fc04..4421ce9c7d331 100644 --- a/src/test/ui/cross/cross-crate-macro-backtrace/main.stderr +++ b/src/test/ui/cross/cross-crate-macro-backtrace/main.stderr @@ -4,7 +4,7 @@ error: 1 positional argument in format string, but no arguments were given LL | myprintln!("{}"); | ^^^^^^^^^^^^^^^^^ | - = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info) + = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z macro-backtrace for more info) error: aborting due to previous error diff --git a/src/test/ui/deprecation/deprecation-lint-2.stderr b/src/test/ui/deprecation/deprecation-lint-2.stderr index e8c2156742f0d..1f9c5e3d7690b 100644 --- a/src/test/ui/deprecation/deprecation-lint-2.stderr +++ b/src/test/ui/deprecation/deprecation-lint-2.stderr @@ -9,7 +9,7 @@ note: the lint level is defined here | LL | #![deny(deprecated)] | ^^^^^^^^^^ - = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info) + = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z macro-backtrace for more info) error: aborting due to previous error diff --git a/src/test/ui/deprecation/deprecation-lint-3.stderr b/src/test/ui/deprecation/deprecation-lint-3.stderr index 7cc06a23b0fe3..f675b6af958f5 100644 --- a/src/test/ui/deprecation/deprecation-lint-3.stderr +++ b/src/test/ui/deprecation/deprecation-lint-3.stderr @@ -9,7 +9,7 @@ note: the lint level is defined here | LL | #![deny(deprecated)] | ^^^^^^^^^^ - = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info) + = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z macro-backtrace for more info) error: aborting due to previous error diff --git a/src/test/ui/deref-suggestion.stderr b/src/test/ui/deref-suggestion.stderr index 226f6fb620fc2..f4843469ccefc 100644 --- a/src/test/ui/deref-suggestion.stderr +++ b/src/test/ui/deref-suggestion.stderr @@ -49,7 +49,7 @@ error[E0308]: mismatched types LL | assert_eq!(3i32, &3i32); | ^^^^^^^^^^^^^^^^^^^^^^^^ expected `i32`, found `&i32` | - = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info) + = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z macro-backtrace for more info) error[E0308]: mismatched types --> $DIR/deref-suggestion.rs:39:17 diff --git a/src/test/ui/editions/edition-imports-2015.stderr b/src/test/ui/editions/edition-imports-2015.stderr index 4aba5323cc575..4b7be3cf98dfe 100644 --- a/src/test/ui/editions/edition-imports-2015.stderr +++ b/src/test/ui/editions/edition-imports-2015.stderr @@ -4,7 +4,7 @@ error: cannot glob-import all possible crates LL | gen_glob!(); | ^^^^^^^^^^^^ | - = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info) + = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z macro-backtrace for more info) error: aborting due to previous error diff --git a/src/test/ui/editions/edition-imports-2018.stderr b/src/test/ui/editions/edition-imports-2018.stderr index 6ef49b6256058..d83934ccc239e 100644 --- a/src/test/ui/editions/edition-imports-2018.stderr +++ b/src/test/ui/editions/edition-imports-2018.stderr @@ -4,7 +4,7 @@ error: cannot glob-import all possible crates LL | gen_glob!(); | ^^^^^^^^^^^^ | - = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info) + = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z macro-backtrace for more info) error: aborting due to previous error diff --git a/src/test/ui/editions/edition-imports-virtual-2015-gated.stderr b/src/test/ui/editions/edition-imports-virtual-2015-gated.stderr index e6d0f18a67722..43a4c8a361fd9 100644 --- a/src/test/ui/editions/edition-imports-virtual-2015-gated.stderr +++ b/src/test/ui/editions/edition-imports-virtual-2015-gated.stderr @@ -4,7 +4,7 @@ error[E0432]: unresolved import `E` LL | gen_gated!(); | ^^^^^^^^^^^^^ could not find `E` in `{{root}}` | - = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info) + = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z macro-backtrace for more info) error: aborting due to previous error diff --git a/src/test/ui/editions/edition-keywords-2015-2018-expansion.stderr b/src/test/ui/editions/edition-keywords-2015-2018-expansion.stderr index 04a70cf98302f..f4b41d3accc51 100644 --- a/src/test/ui/editions/edition-keywords-2015-2018-expansion.stderr +++ b/src/test/ui/editions/edition-keywords-2015-2018-expansion.stderr @@ -4,7 +4,7 @@ error: expected identifier, found keyword `async` LL | produces_async! {} | ^^^^^^^^^^^^^^^^^^ expected identifier, found keyword | - = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info) + = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z macro-backtrace for more info) help: you can escape reserved keywords to use them as identifiers | LL | () => (pub fn r#async () { }) diff --git a/src/test/ui/editions/edition-keywords-2018-2018-expansion.stderr b/src/test/ui/editions/edition-keywords-2018-2018-expansion.stderr index fb12051eed409..d747b8232ebc3 100644 --- a/src/test/ui/editions/edition-keywords-2018-2018-expansion.stderr +++ b/src/test/ui/editions/edition-keywords-2018-2018-expansion.stderr @@ -4,7 +4,7 @@ error: expected identifier, found keyword `async` LL | produces_async! {} | ^^^^^^^^^^^^^^^^^^ expected identifier, found keyword | - = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info) + = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z macro-backtrace for more info) help: you can escape reserved keywords to use them as identifiers | LL | () => (pub fn r#async () { }) diff --git a/src/test/ui/hygiene/intercrate.stderr b/src/test/ui/hygiene/intercrate.stderr index 30a5570b2ad0e..75347d6e8c950 100644 --- a/src/test/ui/hygiene/intercrate.stderr +++ b/src/test/ui/hygiene/intercrate.stderr @@ -4,7 +4,7 @@ error: type `fn() -> u32 {intercrate::foo::bar::f}` is private LL | assert_eq!(intercrate::foo::m!(), 1); | ^^^^^^^^^^^^^^^^^^^^^ | - = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info) + = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z macro-backtrace for more info) error: aborting due to previous error diff --git a/src/test/ui/hygiene/no_implicit_prelude.stderr b/src/test/ui/hygiene/no_implicit_prelude.stderr index 5d75f5034bc65..a466471d5e4ec 100644 --- a/src/test/ui/hygiene/no_implicit_prelude.stderr +++ b/src/test/ui/hygiene/no_implicit_prelude.stderr @@ -4,7 +4,7 @@ error: cannot find macro `panic` in this scope LL | assert_eq!(0, 0); | ^^^^^^^^^^^^^^^^^ | - = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info) + = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z macro-backtrace for more info) error[E0433]: failed to resolve: use of undeclared type or module `Vec` --> $DIR/no_implicit_prelude.rs:11:9 diff --git a/src/test/ui/imports/import-crate-var.stderr b/src/test/ui/imports/import-crate-var.stderr index 85f15ad4648a7..11eca073f9558 100644 --- a/src/test/ui/imports/import-crate-var.stderr +++ b/src/test/ui/imports/import-crate-var.stderr @@ -4,7 +4,7 @@ error: `$crate` may not be imported LL | m!(); | ^^^^^ | - = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info) + = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z macro-backtrace for more info) error: aborting due to previous error diff --git a/src/test/ui/internal/internal-unstable-noallow.stderr b/src/test/ui/internal/internal-unstable-noallow.stderr index 5a3a2356150dd..873d8f898811f 100644 --- a/src/test/ui/internal/internal-unstable-noallow.stderr +++ b/src/test/ui/internal/internal-unstable-noallow.stderr @@ -5,7 +5,7 @@ LL | call_unstable_noallow!(); | ^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: add `#![feature(function)]` to the crate attributes to enable - = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info) + = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z macro-backtrace for more info) error[E0658]: use of unstable library feature 'struct_field' --> $DIR/internal-unstable-noallow.rs:18:5 @@ -14,7 +14,7 @@ LL | construct_unstable_noallow!(0); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: add `#![feature(struct_field)]` to the crate attributes to enable - = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info) + = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z macro-backtrace for more info) error[E0658]: use of unstable library feature 'method' --> $DIR/internal-unstable-noallow.rs:20:35 @@ -23,7 +23,7 @@ LL | |x: internal_unstable::Foo| { call_method_noallow!(x) }; | ^^^^^^^^^^^^^^^^^^^^^^^ | = help: add `#![feature(method)]` to the crate attributes to enable - = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info) + = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z macro-backtrace for more info) error[E0658]: use of unstable library feature 'struct2_field' --> $DIR/internal-unstable-noallow.rs:22:35 @@ -32,7 +32,7 @@ LL | |x: internal_unstable::Bar| { access_field_noallow!(x) }; | ^^^^^^^^^^^^^^^^^^^^^^^^ | = help: add `#![feature(struct2_field)]` to the crate attributes to enable - = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info) + = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z macro-backtrace for more info) error: aborting due to 4 previous errors diff --git a/src/test/ui/issues/issue-13446.stderr b/src/test/ui/issues/issue-13446.stderr index 13c35dd84f7c5..fbafae5e6344c 100644 --- a/src/test/ui/issues/issue-13446.stderr +++ b/src/test/ui/issues/issue-13446.stderr @@ -6,7 +6,7 @@ LL | static VEC: [u32; 256] = vec![]; | = note: expected array `[u32; 256]` found struct `std::vec::Vec<_>` - = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info) + = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z macro-backtrace for more info) error: aborting due to previous error diff --git a/src/test/ui/issues/issue-16966.stderr b/src/test/ui/issues/issue-16966.stderr index 49a12cc200947..dc715e2858b47 100644 --- a/src/test/ui/issues/issue-16966.stderr +++ b/src/test/ui/issues/issue-16966.stderr @@ -4,7 +4,7 @@ error[E0282]: type annotations needed LL | panic!(std::default::Default::default()); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ cannot infer type for type parameter `M` declared on the function `begin_panic` | - = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info) + = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z macro-backtrace for more info) error: aborting due to previous error diff --git a/src/test/ui/issues/issue-2150.stderr b/src/test/ui/issues/issue-2150.stderr index 3f3702551069f..f3de6941cfe94 100644 --- a/src/test/ui/issues/issue-2150.stderr +++ b/src/test/ui/issues/issue-2150.stderr @@ -11,7 +11,7 @@ note: the lint level is defined here | LL | #![deny(unreachable_code)] | ^^^^^^^^^^^^^^^^ - = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info) + = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z macro-backtrace for more info) error: aborting due to previous error diff --git a/src/test/ui/issues/issue-32829.stderr b/src/test/ui/issues/issue-32829.stderr index b620abbf436d7..25da3f6a55065 100644 --- a/src/test/ui/issues/issue-32829.stderr +++ b/src/test/ui/issues/issue-32829.stderr @@ -6,7 +6,7 @@ LL | static S : u64 = { { panic!("foo"); 0 } }; | = note: for more information, see https://github.com/rust-lang/rust/issues/51999 = help: add `#![feature(const_panic)]` to the crate attributes to enable - = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info) + = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z macro-backtrace for more info) error: aborting due to previous error diff --git a/src/test/ui/issues/issue-34334.stderr b/src/test/ui/issues/issue-34334.stderr index c52ea4ef9daa9..8d20377be576a 100644 --- a/src/test/ui/issues/issue-34334.stderr +++ b/src/test/ui/issues/issue-34334.stderr @@ -33,7 +33,7 @@ LL | let sr: Vec<(u32, _, _) = vec![]; | = note: expected type `bool` found struct `std::vec::Vec<_>` - = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info) + = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z macro-backtrace for more info) error[E0070]: invalid left-hand side of assignment --> $DIR/issue-34334.rs:2:29 diff --git a/src/test/ui/issues/issue-59488.stderr b/src/test/ui/issues/issue-59488.stderr index 35ada71a1f128..4e5cf23afe143 100644 --- a/src/test/ui/issues/issue-59488.stderr +++ b/src/test/ui/issues/issue-59488.stderr @@ -80,7 +80,7 @@ LL | assert_eq!(Foo::Bar, i); | fn(usize) -> Foo {Foo::Bar} | = note: an implementation of `std::cmp::PartialEq` might be missing for `fn(usize) -> Foo {Foo::Bar}` - = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info) + = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z macro-backtrace for more info) error[E0277]: `fn(usize) -> Foo {Foo::Bar}` doesn't implement `std::fmt::Debug` --> $DIR/issue-59488.rs:30:5 @@ -91,7 +91,7 @@ LL | assert_eq!(Foo::Bar, i); = help: the trait `std::fmt::Debug` is not implemented for `fn(usize) -> Foo {Foo::Bar}` = note: required because of the requirements on the impl of `std::fmt::Debug` for `&fn(usize) -> Foo {Foo::Bar}` = note: required by `std::fmt::Debug::fmt` - = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info) + = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z macro-backtrace for more info) error[E0277]: `fn(usize) -> Foo {Foo::Bar}` doesn't implement `std::fmt::Debug` --> $DIR/issue-59488.rs:30:5 @@ -102,7 +102,7 @@ LL | assert_eq!(Foo::Bar, i); = help: the trait `std::fmt::Debug` is not implemented for `fn(usize) -> Foo {Foo::Bar}` = note: required because of the requirements on the impl of `std::fmt::Debug` for `&fn(usize) -> Foo {Foo::Bar}` = note: required by `std::fmt::Debug::fmt` - = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info) + = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z macro-backtrace for more info) error: aborting due to 10 previous errors diff --git a/src/test/ui/lifetimes/borrowck-let-suggestion.stderr b/src/test/ui/lifetimes/borrowck-let-suggestion.stderr index 0e2fc0a0fe97e..10d05fd8f2b1b 100644 --- a/src/test/ui/lifetimes/borrowck-let-suggestion.stderr +++ b/src/test/ui/lifetimes/borrowck-let-suggestion.stderr @@ -10,7 +10,7 @@ LL | x.use_mut(); | - borrow later used here | = note: consider using a `let` binding to create a longer lived value - = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info) + = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z macro-backtrace for more info) error: aborting due to previous error diff --git a/src/test/ui/lint/lint-stability2.stderr b/src/test/ui/lint/lint-stability2.stderr index 5bac22594d665..bf737bcc0e347 100644 --- a/src/test/ui/lint/lint-stability2.stderr +++ b/src/test/ui/lint/lint-stability2.stderr @@ -9,7 +9,7 @@ note: the lint level is defined here | LL | #![deny(deprecated)] | ^^^^^^^^^^ - = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info) + = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z macro-backtrace for more info) error: aborting due to previous error diff --git a/src/test/ui/lint/lint-stability3.stderr b/src/test/ui/lint/lint-stability3.stderr index 566734743caba..29b19577f440f 100644 --- a/src/test/ui/lint/lint-stability3.stderr +++ b/src/test/ui/lint/lint-stability3.stderr @@ -9,7 +9,7 @@ note: the lint level is defined here | LL | #![deny(deprecated)] | ^^^^^^^^^^ - = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info) + = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z macro-backtrace for more info) error: aborting due to previous error diff --git a/src/test/ui/macro_backtrace/main.rs b/src/test/ui/macro_backtrace/main.rs index 8fcd497f87b78..05f35855861f5 100644 --- a/src/test/ui/macro_backtrace/main.rs +++ b/src/test/ui/macro_backtrace/main.rs @@ -1,6 +1,6 @@ // Test that the macro backtrace facility works // aux-build:ping.rs -// compile-flags: -Z external-macro-backtrace +// compile-flags: -Z macro-backtrace #[macro_use] extern crate ping; diff --git a/src/test/ui/macros/assert.stderr b/src/test/ui/macros/assert.stderr index fa604506b9464..4bbdf01150c4c 100644 --- a/src/test/ui/macros/assert.stderr +++ b/src/test/ui/macros/assert.stderr @@ -16,7 +16,7 @@ error: macro requires a boolean expression as an argument LL | debug_assert!(); | ^^^^^^^^^^^^^^^^ boolean expression required | - = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info) + = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z macro-backtrace for more info) error: expected expression, found keyword `struct` --> $DIR/assert.rs:5:19 diff --git a/src/test/ui/macros/format-parse-errors.stderr b/src/test/ui/macros/format-parse-errors.stderr index 02b704299ff05..0c10fb644b0f6 100644 --- a/src/test/ui/macros/format-parse-errors.stderr +++ b/src/test/ui/macros/format-parse-errors.stderr @@ -4,7 +4,7 @@ error: requires at least a format string argument LL | format!(); | ^^^^^^^^^^ | - = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info) + = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z macro-backtrace for more info) error: expected expression, found keyword `struct` --> $DIR/format-parse-errors.rs:5:13 diff --git a/src/test/ui/macros/macro-local-data-key-priv.stderr b/src/test/ui/macros/macro-local-data-key-priv.stderr index 72994d1652cd0..5519105ca9a54 100644 --- a/src/test/ui/macros/macro-local-data-key-priv.stderr +++ b/src/test/ui/macros/macro-local-data-key-priv.stderr @@ -9,7 +9,7 @@ note: the constant `baz` is defined here | LL | thread_local!(static baz: f64 = 0.0); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info) + = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z macro-backtrace for more info) error: aborting due to previous error diff --git a/src/test/ui/macros/must-use-in-macro-55516.stderr b/src/test/ui/macros/must-use-in-macro-55516.stderr index 302c8aa7e6a55..a8ee9cf255628 100644 --- a/src/test/ui/macros/must-use-in-macro-55516.stderr +++ b/src/test/ui/macros/must-use-in-macro-55516.stderr @@ -6,5 +6,5 @@ LL | write!(&mut example, "{}", 42); | = note: `-W unused-must-use` implied by `-W unused` = note: this `Result` may be an `Err` variant, which should be handled - = note: this warning originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info) + = note: this warning originates in a macro outside of the current crate (in Nightly builds, run with -Z macro-backtrace for more info) diff --git a/src/test/ui/match/match-arm-resolving-to-never.stderr b/src/test/ui/match/match-arm-resolving-to-never.stderr index 3a723de9f6b8a..a824e3565509d 100644 --- a/src/test/ui/match/match-arm-resolving-to-never.stderr +++ b/src/test/ui/match/match-arm-resolving-to-never.stderr @@ -13,7 +13,7 @@ LL | | E::F => "", LL | | }; | |_____- `match` arms have incompatible types | - = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info) + = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z macro-backtrace for more info) error: aborting due to previous error diff --git a/src/test/ui/methods/method-on-ambiguous-numeric-type.stderr b/src/test/ui/methods/method-on-ambiguous-numeric-type.stderr index d9e250882e1c1..277bcce6af9c5 100644 --- a/src/test/ui/methods/method-on-ambiguous-numeric-type.stderr +++ b/src/test/ui/methods/method-on-ambiguous-numeric-type.stderr @@ -47,7 +47,7 @@ LL | mac!(bar); LL | bar.pow(2); | ^^^ | - = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info) + = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z macro-backtrace for more info) error: aborting due to 5 previous errors diff --git a/src/test/ui/never_type/feature-gate-never_type_fallback.stderr b/src/test/ui/never_type/feature-gate-never_type_fallback.stderr index 08e16f4693645..8f7d68737bc09 100644 --- a/src/test/ui/never_type/feature-gate-never_type_fallback.stderr +++ b/src/test/ui/never_type/feature-gate-never_type_fallback.stderr @@ -8,7 +8,7 @@ LL | panic!() | -------- this returned value is of type `!` | = note: the return type of a function must have a statically known size - = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info) + = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z macro-backtrace for more info) error: aborting due to previous error diff --git a/src/test/ui/never_type/never-assign-dead-code.stderr b/src/test/ui/never_type/never-assign-dead-code.stderr index f0a11ae1bcc28..ef48083d67061 100644 --- a/src/test/ui/never_type/never-assign-dead-code.stderr +++ b/src/test/ui/never_type/never-assign-dead-code.stderr @@ -12,7 +12,7 @@ note: the lint level is defined here LL | #![warn(unused)] | ^^^^^^ = note: `#[warn(unreachable_code)]` implied by `#[warn(unused)]` - = note: this warning originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info) + = note: this warning originates in a macro outside of the current crate (in Nightly builds, run with -Z macro-backtrace for more info) warning: unreachable call --> $DIR/never-assign-dead-code.rs:10:5 diff --git a/src/test/ui/out-of-order-shadowing.stderr b/src/test/ui/out-of-order-shadowing.stderr index 2a120dee482df..eb93cfe774b9c 100644 --- a/src/test/ui/out-of-order-shadowing.stderr +++ b/src/test/ui/out-of-order-shadowing.stderr @@ -14,7 +14,7 @@ note: `bar` could also refer to the macro defined here | LL | macro_rules! bar { () => {} } | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info) + = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z macro-backtrace for more info) error: aborting due to previous error diff --git a/src/test/ui/privacy/private-inferred-type-3.stderr b/src/test/ui/privacy/private-inferred-type-3.stderr index 61cd84762978c..4f57b17660ee5 100644 --- a/src/test/ui/privacy/private-inferred-type-3.stderr +++ b/src/test/ui/privacy/private-inferred-type-3.stderr @@ -4,7 +4,7 @@ error: type `fn() {ext::priv_fn}` is private LL | ext::m!(); | ^^^^^^^^^^ | - = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info) + = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z macro-backtrace for more info) error: static `PRIV_STATIC` is private --> $DIR/private-inferred-type-3.rs:16:5 @@ -12,7 +12,7 @@ error: static `PRIV_STATIC` is private LL | ext::m!(); | ^^^^^^^^^^ | - = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info) + = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z macro-backtrace for more info) error: type `ext::PrivEnum` is private --> $DIR/private-inferred-type-3.rs:16:5 @@ -20,7 +20,7 @@ error: type `ext::PrivEnum` is private LL | ext::m!(); | ^^^^^^^^^^ | - = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info) + = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z macro-backtrace for more info) error: type `fn() {::method}` is private --> $DIR/private-inferred-type-3.rs:16:5 @@ -28,7 +28,7 @@ error: type `fn() {::method}` is private LL | ext::m!(); | ^^^^^^^^^^ | - = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info) + = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z macro-backtrace for more info) error: type `fn(u8) -> ext::PrivTupleStruct {ext::PrivTupleStruct}` is private --> $DIR/private-inferred-type-3.rs:16:5 @@ -36,7 +36,7 @@ error: type `fn(u8) -> ext::PrivTupleStruct {ext::PrivTupleStruct}` is private LL | ext::m!(); | ^^^^^^^^^^ | - = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info) + = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z macro-backtrace for more info) error: type `fn(u8) -> ext::PubTupleStruct {ext::PubTupleStruct}` is private --> $DIR/private-inferred-type-3.rs:16:5 @@ -44,7 +44,7 @@ error: type `fn(u8) -> ext::PubTupleStruct {ext::PubTupleStruct}` is private LL | ext::m!(); | ^^^^^^^^^^ | - = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info) + = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z macro-backtrace for more info) error: type `for<'r> fn(&'r ext::Pub) {ext::Pub::::priv_method}` is private --> $DIR/private-inferred-type-3.rs:16:5 @@ -52,7 +52,7 @@ error: type `for<'r> fn(&'r ext::Pub) {ext::Pub::::priv_method}` is priv LL | ext::m!(); | ^^^^^^^^^^ | - = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info) + = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z macro-backtrace for more info) error: aborting due to 7 previous errors diff --git a/src/test/ui/proc-macro/dollar-crate.stderr b/src/test/ui/proc-macro/dollar-crate.stderr index 5d78a8e198729..b9d9f9842bcee 100644 --- a/src/test/ui/proc-macro/dollar-crate.stderr +++ b/src/test/ui/proc-macro/dollar-crate.stderr @@ -22,7 +22,7 @@ LL | dollar_crate_external::external!(); | previous definition of the type `D` here | = note: `D` must be defined only once in the type namespace of this module - = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info) + = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z macro-backtrace for more info) error: aborting due to 2 previous errors diff --git a/src/test/ui/reachable/expr_again.stderr b/src/test/ui/reachable/expr_again.stderr index a9b5832ba2c88..805c965a87903 100644 --- a/src/test/ui/reachable/expr_again.stderr +++ b/src/test/ui/reachable/expr_again.stderr @@ -11,7 +11,7 @@ note: the lint level is defined here | LL | #![deny(unreachable_code)] | ^^^^^^^^^^^^^^^^ - = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info) + = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z macro-backtrace for more info) error: aborting due to previous error diff --git a/src/test/ui/reachable/expr_block.stderr b/src/test/ui/reachable/expr_block.stderr index 8b696b7abcb72..bd0c926279632 100644 --- a/src/test/ui/reachable/expr_block.stderr +++ b/src/test/ui/reachable/expr_block.stderr @@ -20,7 +20,7 @@ LL | return; LL | println!("foo"); | ^^^^^^^^^^^^^^^^ unreachable statement | - = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info) + = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z macro-backtrace for more info) error: aborting due to 2 previous errors diff --git a/src/test/ui/reachable/expr_if.stderr b/src/test/ui/reachable/expr_if.stderr index 6ae635ae4b7e8..bfb4675df1186 100644 --- a/src/test/ui/reachable/expr_if.stderr +++ b/src/test/ui/reachable/expr_if.stderr @@ -24,7 +24,7 @@ LL | return; LL | println!("But I am."); | ^^^^^^^^^^^^^^^^^^^^^^ unreachable statement | - = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info) + = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z macro-backtrace for more info) error: aborting due to 2 previous errors diff --git a/src/test/ui/reachable/expr_loop.stderr b/src/test/ui/reachable/expr_loop.stderr index e5d395254a06d..dd294ddccd970 100644 --- a/src/test/ui/reachable/expr_loop.stderr +++ b/src/test/ui/reachable/expr_loop.stderr @@ -11,7 +11,7 @@ note: the lint level is defined here | LL | #![deny(unreachable_code)] | ^^^^^^^^^^^^^^^^ - = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info) + = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z macro-backtrace for more info) error: unreachable statement --> $DIR/expr_loop.rs:21:5 @@ -21,7 +21,7 @@ LL | loop { return; } LL | println!("I am dead."); | ^^^^^^^^^^^^^^^^^^^^^^^ unreachable statement | - = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info) + = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z macro-backtrace for more info) error: unreachable statement --> $DIR/expr_loop.rs:32:5 @@ -31,7 +31,7 @@ LL | loop { 'middle: loop { loop { break 'middle; } } } LL | println!("I am dead."); | ^^^^^^^^^^^^^^^^^^^^^^^ unreachable statement | - = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info) + = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z macro-backtrace for more info) error: aborting due to 3 previous errors diff --git a/src/test/ui/reachable/expr_match.stderr b/src/test/ui/reachable/expr_match.stderr index a8317192c2b32..796cbba12a2b1 100644 --- a/src/test/ui/reachable/expr_match.stderr +++ b/src/test/ui/reachable/expr_match.stderr @@ -11,7 +11,7 @@ note: the lint level is defined here | LL | #![deny(unreachable_code)] | ^^^^^^^^^^^^^^^^ - = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info) + = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z macro-backtrace for more info) error: unreachable statement --> $DIR/expr_match.rs:19:5 @@ -21,7 +21,7 @@ LL | match () { () if false => return, () => return } LL | println!("I am dead"); | ^^^^^^^^^^^^^^^^^^^^^^ unreachable statement | - = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info) + = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z macro-backtrace for more info) error: aborting due to 2 previous errors diff --git a/src/test/ui/regions/regions-var-type-out-of-scope.stderr b/src/test/ui/regions/regions-var-type-out-of-scope.stderr index 146fb8fd81fc6..b15ed910a4feb 100644 --- a/src/test/ui/regions/regions-var-type-out-of-scope.stderr +++ b/src/test/ui/regions/regions-var-type-out-of-scope.stderr @@ -9,7 +9,7 @@ LL | assert_eq!(*x, 3); | ------------------ borrow later used here | = note: consider using a `let` binding to create a longer lived value - = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info) + = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z macro-backtrace for more info) error: aborting due to previous error diff --git a/src/test/ui/rfc-2361-dbg-macro/dbg-macro-move-semantics.stderr b/src/test/ui/rfc-2361-dbg-macro/dbg-macro-move-semantics.stderr index 5f0b3a1d40b7e..58ba38d1304fa 100644 --- a/src/test/ui/rfc-2361-dbg-macro/dbg-macro-move-semantics.stderr +++ b/src/test/ui/rfc-2361-dbg-macro/dbg-macro-move-semantics.stderr @@ -8,7 +8,7 @@ LL | let _ = dbg!(a); LL | let _ = dbg!(a); | ^ value used here after move | - = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info) + = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z macro-backtrace for more info) error: aborting due to previous error diff --git a/src/test/ui/rfc-2361-dbg-macro/dbg-macro-requires-debug.stderr b/src/test/ui/rfc-2361-dbg-macro/dbg-macro-requires-debug.stderr index ecab673953d6d..460561997e163 100644 --- a/src/test/ui/rfc-2361-dbg-macro/dbg-macro-requires-debug.stderr +++ b/src/test/ui/rfc-2361-dbg-macro/dbg-macro-requires-debug.stderr @@ -8,7 +8,7 @@ LL | let _: NotDebug = dbg!(NotDebug); = note: add `#[derive(Debug)]` or manually implement `std::fmt::Debug` = note: required because of the requirements on the impl of `std::fmt::Debug` for `&NotDebug` = note: required by `std::fmt::Debug::fmt` - = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info) + = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z macro-backtrace for more info) error: aborting due to previous error diff --git a/src/test/ui/span/coerce-suggestions.stderr b/src/test/ui/span/coerce-suggestions.stderr index 343644006b153..ee1f99e3b07b4 100644 --- a/src/test/ui/span/coerce-suggestions.stderr +++ b/src/test/ui/span/coerce-suggestions.stderr @@ -49,7 +49,7 @@ error[E0308]: mismatched types LL | s = format!("foo"); | ^^^^^^^^^^^^^^ expected `&mut std::string::String`, found struct `std::string::String` | - = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info) + = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z macro-backtrace for more info) error: aborting due to 6 previous errors diff --git a/src/test/ui/span/issue-33884.stderr b/src/test/ui/span/issue-33884.stderr index 4f46c4c739436..3d00ef29052e9 100644 --- a/src/test/ui/span/issue-33884.stderr +++ b/src/test/ui/span/issue-33884.stderr @@ -4,7 +4,7 @@ error[E0308]: mismatched types LL | stream.write_fmt(format!("message received")) | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected struct `std::fmt::Arguments`, found struct `std::string::String` | - = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info) + = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z macro-backtrace for more info) error: aborting due to previous error diff --git a/src/test/ui/span/slice-borrow.stderr b/src/test/ui/span/slice-borrow.stderr index 84d0c847b7bdc..b28e3cf8d666e 100644 --- a/src/test/ui/span/slice-borrow.stderr +++ b/src/test/ui/span/slice-borrow.stderr @@ -10,7 +10,7 @@ LL | y.use_ref(); | - borrow later used here | = note: consider using a `let` binding to create a longer lived value - = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info) + = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z macro-backtrace for more info) error: aborting due to previous error diff --git a/src/test/ui/suggestions/dont-suggest-deref-inside-macro-issue-58298.stderr b/src/test/ui/suggestions/dont-suggest-deref-inside-macro-issue-58298.stderr index e37edc1dacafa..fe2583eafe505 100644 --- a/src/test/ui/suggestions/dont-suggest-deref-inside-macro-issue-58298.stderr +++ b/src/test/ui/suggestions/dont-suggest-deref-inside-macro-issue-58298.stderr @@ -9,7 +9,7 @@ LL | | }; | |______expected `&str`, found struct `std::string::String` | in this macro invocation | - = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info) + = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z macro-backtrace for more info) error: aborting due to previous error diff --git a/src/test/ui/suggestions/dont-suggest-try_into-in-macros.stderr b/src/test/ui/suggestions/dont-suggest-try_into-in-macros.stderr index 1f2252f4d4375..092503cdf8063 100644 --- a/src/test/ui/suggestions/dont-suggest-try_into-in-macros.stderr +++ b/src/test/ui/suggestions/dont-suggest-try_into-in-macros.stderr @@ -4,7 +4,7 @@ error[E0308]: mismatched types LL | assert_eq!(10u64, 10usize); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `u64`, found `usize` | - = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info) + = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z macro-backtrace for more info) error: aborting due to previous error diff --git a/src/test/ui/suggestions/mut-borrow-needed-by-trait.stderr b/src/test/ui/suggestions/mut-borrow-needed-by-trait.stderr index 2c3c07c19e7bd..5d26366fe83c6 100644 --- a/src/test/ui/suggestions/mut-borrow-needed-by-trait.stderr +++ b/src/test/ui/suggestions/mut-borrow-needed-by-trait.stderr @@ -33,7 +33,7 @@ LL | writeln!(fp, "hello world").unwrap(); | = note: the method `write_fmt` exists but the following trait bounds were not satisfied: `std::io::BufWriter<&dyn std::io::Write> : std::io::Write` - = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info) + = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z macro-backtrace for more info) error: aborting due to 4 previous errors diff --git a/src/test/ui/suggestions/vec-macro-in-pattern.stderr b/src/test/ui/suggestions/vec-macro-in-pattern.stderr index 1634fdde7d295..a69502de786f0 100644 --- a/src/test/ui/suggestions/vec-macro-in-pattern.stderr +++ b/src/test/ui/suggestions/vec-macro-in-pattern.stderr @@ -10,7 +10,7 @@ LL | Some(vec![_x]) => (), | help: use a slice pattern here instead: `[_x]` | = help: for more information, see https://doc.rust-lang.org/edition-guide/rust-2018/slice-patterns.html - = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info) + = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z macro-backtrace for more info) error: aborting due to previous error diff --git a/src/test/ui/try-block/try-block-opt-init.stderr b/src/test/ui/try-block/try-block-opt-init.stderr index 308906477d914..d88397f398f88 100644 --- a/src/test/ui/try-block/try-block-opt-init.stderr +++ b/src/test/ui/try-block/try-block-opt-init.stderr @@ -4,7 +4,7 @@ error[E0381]: borrow of possibly-uninitialized variable: `cfg_res` LL | assert_eq!(cfg_res, 5); | ^^^^^^^^^^^^^^^^^^^^^^^ use of possibly-uninitialized `cfg_res` | - = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info) + = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z macro-backtrace for more info) error: aborting due to previous error diff --git a/src/test/ui/type/ascription/issue-47666.stderr b/src/test/ui/type/ascription/issue-47666.stderr index 648635f0c32fa..d6f4a8d761914 100644 --- a/src/test/ui/type/ascription/issue-47666.stderr +++ b/src/test/ui/type/ascription/issue-47666.stderr @@ -11,7 +11,7 @@ LL | let _ = Option:Some(vec![0, 1]); | = note: `#![feature(type_ascription)]` lets you annotate an expression with a type: `: ` = note: for more information, see https://github.com/rust-lang/rust/issues/23416 - = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info) + = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z macro-backtrace for more info) error: aborting due to previous error diff --git a/src/test/ui/type/type-check/cannot_infer_local_or_vec.stderr b/src/test/ui/type/type-check/cannot_infer_local_or_vec.stderr index 53cc769bae3cf..7f0de3f1d70de 100644 --- a/src/test/ui/type/type-check/cannot_infer_local_or_vec.stderr +++ b/src/test/ui/type/type-check/cannot_infer_local_or_vec.stderr @@ -6,7 +6,7 @@ LL | let x = vec![]; | | | consider giving `x` the explicit type `std::vec::Vec`, where the type parameter `T` is specified | - = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info) + = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z macro-backtrace for more info) error: aborting due to previous error diff --git a/src/test/ui/type/type-check/cannot_infer_local_or_vec_in_tuples.stderr b/src/test/ui/type/type-check/cannot_infer_local_or_vec_in_tuples.stderr index df7228ce9f2a8..1fa436c216b37 100644 --- a/src/test/ui/type/type-check/cannot_infer_local_or_vec_in_tuples.stderr +++ b/src/test/ui/type/type-check/cannot_infer_local_or_vec_in_tuples.stderr @@ -6,7 +6,7 @@ LL | let (x, ) = (vec![], ); | | | consider giving this pattern the explicit type `(std::vec::Vec,)`, where the type parameter `T` is specified | - = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info) + = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z macro-backtrace for more info) error: aborting due to previous error diff --git a/src/test/ui/unreachable-code-ret.stderr b/src/test/ui/unreachable-code-ret.stderr index 3b93ef97f3206..021f8b03eab3a 100644 --- a/src/test/ui/unreachable-code-ret.stderr +++ b/src/test/ui/unreachable-code-ret.stderr @@ -11,7 +11,7 @@ note: the lint level is defined here | LL | #![deny(unreachable_code)] | ^^^^^^^^^^^^^^^^ - = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info) + = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z macro-backtrace for more info) error: aborting due to previous error From 5eaa9a150d470019ac0924ece7a23a0d1cefe5f4 Mon Sep 17 00:00:00 2001 From: Eduard-Mihai Burtescu Date: Wed, 15 Jan 2020 17:50:26 +0200 Subject: [PATCH 3/6] rustc_errors: deduplicate the -Zmacro-backtrace suggestion message. --- src/librustc_errors/emitter.rs | 17 +++++------------ 1 file changed, 5 insertions(+), 12 deletions(-) diff --git a/src/librustc_errors/emitter.rs b/src/librustc_errors/emitter.rs index 59493b4a683b0..a57b59a196293 100644 --- a/src/librustc_errors/emitter.rs +++ b/src/librustc_errors/emitter.rs @@ -14,7 +14,6 @@ use rustc_span::{MultiSpan, SourceFile, Span}; use crate::snippet::{Annotation, AnnotationType, Line, MultilineAnnotation, Style, StyledString}; use crate::styled_buffer::StyledBuffer; -use crate::Level::Error; use crate::{ pluralize, CodeSuggestion, Diagnostic, DiagnosticId, Level, SubDiagnostic, SuggestionStyle, }; @@ -284,17 +283,11 @@ pub trait Emitter { if !backtrace { if self.fix_multispans_in_extern_macros(source_map, span, children) { - let msg = if level == &Error { - "this error originates in a macro outside of the current crate \ - (in Nightly builds, run with -Z macro-backtrace \ - for more info)" - .to_string() - } else { - "this warning originates in a macro outside of the current crate \ - (in Nightly builds, run with -Z macro-backtrace \ - for more info)" - .to_string() - }; + let msg = format!( + "this {} originates in a macro outside of the current crate \ + (in Nightly builds, run with -Z macro-backtrace for more info)", + level, + ); children.push(SubDiagnostic { level: Level::Note, From ab080973cb3bfa96f71b7d29fc5c3e34893cf896 Mon Sep 17 00:00:00 2001 From: Eduard-Mihai Burtescu Date: Sun, 15 Dec 2019 17:47:51 +0200 Subject: [PATCH 4/6] rustc_errors: hide "in this macro invocation" when redundant, more explicitly. --- .../annotate_snippet_emitter_writer.rs | 2 +- src/librustc_errors/emitter.rs | 63 +++++++++++-------- src/test/ui/macros/same-sequence-span.stderr | 5 +- src/test/ui/proc-macro/generate-mod.stderr | 10 +-- .../proc-macro/invalid-punct-ident-4.stderr | 5 +- .../ui/proc-macro/lints_in_proc_macros.stderr | 5 +- src/test/ui/proc-macro/mixed-site-span.stderr | 10 +-- src/test/ui/proc-macro/subspan.stderr | 16 ++--- ...gest-deref-inside-macro-issue-58298.stderr | 5 +- 9 files changed, 53 insertions(+), 68 deletions(-) diff --git a/src/librustc_errors/annotate_snippet_emitter_writer.rs b/src/librustc_errors/annotate_snippet_emitter_writer.rs index 1eda1c9200f6e..d83175694f407 100644 --- a/src/librustc_errors/annotate_snippet_emitter_writer.rs +++ b/src/librustc_errors/annotate_snippet_emitter_writer.rs @@ -32,7 +32,7 @@ impl Emitter for AnnotateSnippetEmitterWriter { let mut children = diag.children.clone(); let (mut primary_span, suggestions) = self.primary_span_formatted(&diag); - self.render_multispans_macro_backtrace_and_fix_extern_macros( + self.fix_multispans_in_extern_macros_and_render_macro_backtrace( &self.source_map, &mut primary_span, &mut children, diff --git a/src/librustc_errors/emitter.rs b/src/librustc_errors/emitter.rs index a57b59a196293..4857ff47462c8 100644 --- a/src/librustc_errors/emitter.rs +++ b/src/librustc_errors/emitter.rs @@ -271,7 +271,7 @@ pub trait Emitter { } } - fn render_multispans_macro_backtrace_and_fix_extern_macros( + fn fix_multispans_in_extern_macros_and_render_macro_backtrace( &self, source_map: &Option>, span: &mut MultiSpan, @@ -279,10 +279,16 @@ pub trait Emitter { level: &Level, backtrace: bool, ) { - self.render_multispans_macro_backtrace(source_map, span, children, backtrace); + let mut external_spans_updated = false; + if !backtrace { + external_spans_updated = + self.fix_multispans_in_extern_macros(source_map, span, children); + } + + self.render_multispans_macro_backtrace(span, children, backtrace); if !backtrace { - if self.fix_multispans_in_extern_macros(source_map, span, children) { + if external_spans_updated { let msg = format!( "this {} originates in a macro outside of the current crate \ (in Nightly builds, run with -Z macro-backtrace for more info)", @@ -301,42 +307,33 @@ pub trait Emitter { fn render_multispans_macro_backtrace( &self, - source_map: &Option>, span: &mut MultiSpan, children: &mut Vec, backtrace: bool, ) { - self.render_multispan_macro_backtrace(source_map, span, backtrace); + self.render_multispan_macro_backtrace(span, backtrace); for child in children.iter_mut() { - self.render_multispan_macro_backtrace(source_map, &mut child.span, backtrace); + self.render_multispan_macro_backtrace(&mut child.span, backtrace); } } - fn render_multispan_macro_backtrace( - &self, - source_map: &Option>, - span: &mut MultiSpan, - always_backtrace: bool, - ) { - let sm = match source_map { - Some(ref sm) => sm, - None => return, - }; - + fn render_multispan_macro_backtrace(&self, span: &mut MultiSpan, always_backtrace: bool) { let mut new_labels: Vec<(Span, String)> = vec![]; - // First, find all the spans in <*macros> and point instead at their use site for &sp in span.primary_spans() { if sp.is_dummy() { continue; } + + // FIXME(eddyb) use `retain` on `macro_backtrace` to remove all the + // entries we don't want to print, to make sure the indices being + // printed are contiguous (or omitted if there's only one entry). let macro_backtrace: Vec<_> = sp.macro_backtrace().collect(); for (i, trace) in macro_backtrace.iter().rev().enumerate() { - // Only show macro locations that are local - // and display them like a span_note if trace.def_site.is_dummy() { continue; } + if always_backtrace { new_labels.push(( trace.def_site, @@ -353,9 +350,21 @@ pub trait Emitter { ), )); } - // Check to make sure we're not in any <*macros> - if !sm.span_to_filename(trace.def_site).is_macros() - && matches!(trace.kind, ExpnKind::Macro(MacroKind::Bang, _)) + + // Don't add a label on the call site if the diagnostic itself + // already points to (a part of) that call site, as the label + // is meant for showing the relevant invocation when the actual + // diagnostic is pointing to some part of macro definition. + // + // This also handles the case where an external span got replaced + // with the call site span by `fix_multispans_in_extern_macros`. + // + // NB: `-Zmacro-backtrace` overrides this, for uniformity, as the + // "in this expansion of" label above is always added in that mode, + // and it needs an "in this macro invocation" label to match that. + let redundant_span = trace.call_site.contains(sp); + + if !redundant_span && matches!(trace.kind, ExpnKind::Macro(MacroKind::Bang, _)) || always_backtrace { new_labels.push(( @@ -371,9 +380,9 @@ pub trait Emitter { }, ), )); - if !always_backtrace { - break; - } + } + if !always_backtrace { + break; } } } @@ -447,7 +456,7 @@ impl Emitter for EmitterWriter { let mut children = diag.children.clone(); let (mut primary_span, suggestions) = self.primary_span_formatted(&diag); - self.render_multispans_macro_backtrace_and_fix_extern_macros( + self.fix_multispans_in_extern_macros_and_render_macro_backtrace( &self.sm, &mut primary_span, &mut children, diff --git a/src/test/ui/macros/same-sequence-span.stderr b/src/test/ui/macros/same-sequence-span.stderr index 896f579765f95..0a7e019e59f33 100644 --- a/src/test/ui/macros/same-sequence-span.stderr +++ b/src/test/ui/macros/same-sequence-span.stderr @@ -33,10 +33,7 @@ error: `$x:expr` may be followed by `=`, which is not allowed for `expr` fragmen --> $DIR/same-sequence-span.rs:19:1 | LL | proc_macro_sequence::make_foo!(); - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - | | - | not allowed after `expr` fragments - | in this macro invocation + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ not allowed after `expr` fragments | = note: allowed there are: `=>`, `,` or `;` diff --git a/src/test/ui/proc-macro/generate-mod.stderr b/src/test/ui/proc-macro/generate-mod.stderr index fe53fb242f49b..496bd86e9882e 100644 --- a/src/test/ui/proc-macro/generate-mod.stderr +++ b/src/test/ui/proc-macro/generate-mod.stderr @@ -2,10 +2,7 @@ error[E0412]: cannot find type `FromOutside` in this scope --> $DIR/generate-mod.rs:9:1 | LL | generate_mod::check!(); - | ^^^^^^^^^^^^^^^^^^^^^^^ - | | - | not found in this scope - | in this macro invocation + | ^^^^^^^^^^^^^^^^^^^^^^^ not found in this scope | = note: possible candidate is found in another module, you can import it into scope: FromOutside @@ -14,10 +11,7 @@ error[E0412]: cannot find type `Outer` in this scope --> $DIR/generate-mod.rs:9:1 | LL | generate_mod::check!(); - | ^^^^^^^^^^^^^^^^^^^^^^^ - | | - | not found in this scope - | in this macro invocation + | ^^^^^^^^^^^^^^^^^^^^^^^ not found in this scope | = note: possible candidate is found in another module, you can import it into scope: Outer diff --git a/src/test/ui/proc-macro/invalid-punct-ident-4.stderr b/src/test/ui/proc-macro/invalid-punct-ident-4.stderr index e7764004e8de7..cf85974316abc 100644 --- a/src/test/ui/proc-macro/invalid-punct-ident-4.stderr +++ b/src/test/ui/proc-macro/invalid-punct-ident-4.stderr @@ -2,10 +2,7 @@ error: unexpected closing delimiter: `)` --> $DIR/invalid-punct-ident-4.rs:6:1 | LL | lexer_failure!(); - | ^^^^^^^^^^^^^^^^^ - | | - | unexpected closing delimiter - | in this macro invocation + | ^^^^^^^^^^^^^^^^^ unexpected closing delimiter error: proc macro panicked --> $DIR/invalid-punct-ident-4.rs:6:1 diff --git a/src/test/ui/proc-macro/lints_in_proc_macros.stderr b/src/test/ui/proc-macro/lints_in_proc_macros.stderr index f28b8c9fb73e9..2d97cd700be9f 100644 --- a/src/test/ui/proc-macro/lints_in_proc_macros.stderr +++ b/src/test/ui/proc-macro/lints_in_proc_macros.stderr @@ -2,10 +2,7 @@ error[E0425]: cannot find value `foobar2` in this scope --> $DIR/lints_in_proc_macros.rs:12:5 | LL | bang_proc_macro2!(); - | ^^^^^^^^^^^^^^^^^^^^ - | | - | help: a local variable with a similar name exists: `foobar` - | in this macro invocation + | ^^^^^^^^^^^^^^^^^^^^ help: a local variable with a similar name exists: `foobar` error: aborting due to previous error diff --git a/src/test/ui/proc-macro/mixed-site-span.stderr b/src/test/ui/proc-macro/mixed-site-span.stderr index 54d10fe0d9011..b5ca6cb9b29e4 100644 --- a/src/test/ui/proc-macro/mixed-site-span.stderr +++ b/src/test/ui/proc-macro/mixed-site-span.stderr @@ -2,19 +2,13 @@ error[E0426]: use of undeclared label `'label_use` --> $DIR/mixed-site-span.rs:15:9 | LL | proc_macro_rules!(); - | ^^^^^^^^^^^^^^^^^^^^ - | | - | undeclared label `'label_use` - | in this macro invocation + | ^^^^^^^^^^^^^^^^^^^^ undeclared label `'label_use` error[E0425]: cannot find value `local_use` in this scope --> $DIR/mixed-site-span.rs:15:9 | LL | proc_macro_rules!(); - | ^^^^^^^^^^^^^^^^^^^^ - | | - | not found in this scope - | in this macro invocation + | ^^^^^^^^^^^^^^^^^^^^ not found in this scope error[E0425]: cannot find value `local_def` in this scope --> $DIR/mixed-site-span.rs:19:9 diff --git a/src/test/ui/proc-macro/subspan.stderr b/src/test/ui/proc-macro/subspan.stderr index 06715c197bc59..5117dd6d32d49 100644 --- a/src/test/ui/proc-macro/subspan.stderr +++ b/src/test/ui/proc-macro/subspan.stderr @@ -2,7 +2,7 @@ error: found 'hi's --> $DIR/subspan.rs:11:1 | LL | subspan!("hi"); - | ^^^^^^^^^^^^^^^ in this macro invocation + | ^^^^^^^^^^^^^^^ | note: here --> $DIR/subspan.rs:11:11 @@ -14,7 +14,7 @@ error: found 'hi's --> $DIR/subspan.rs:14:1 | LL | subspan!("hihi"); - | ^^^^^^^^^^^^^^^^^ in this macro invocation + | ^^^^^^^^^^^^^^^^^ | note: here --> $DIR/subspan.rs:14:11 @@ -26,7 +26,7 @@ error: found 'hi's --> $DIR/subspan.rs:17:1 | LL | subspan!("hihihi"); - | ^^^^^^^^^^^^^^^^^^^ in this macro invocation + | ^^^^^^^^^^^^^^^^^^^ | note: here --> $DIR/subspan.rs:17:11 @@ -38,7 +38,7 @@ error: found 'hi's --> $DIR/subspan.rs:20:1 | LL | subspan!("why I hide? hi!"); - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ in this macro invocation + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | note: here --> $DIR/subspan.rs:20:17 @@ -50,7 +50,7 @@ error: found 'hi's --> $DIR/subspan.rs:21:1 | LL | subspan!("hey, hi, hidy, hidy, hi hi"); - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ in this macro invocation + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | note: here --> $DIR/subspan.rs:21:16 @@ -62,7 +62,7 @@ error: found 'hi's --> $DIR/subspan.rs:22:1 | LL | subspan!("this is a hi, and this is another hi"); - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ in this macro invocation + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | note: here --> $DIR/subspan.rs:22:12 @@ -74,7 +74,7 @@ error: found 'hi's --> $DIR/subspan.rs:23:1 | LL | subspan!("how are you this evening"); - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ in this macro invocation + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | note: here --> $DIR/subspan.rs:23:24 @@ -86,7 +86,7 @@ error: found 'hi's --> $DIR/subspan.rs:24:1 | LL | subspan!("this is highly eradic"); - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ in this macro invocation + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | note: here --> $DIR/subspan.rs:24:12 diff --git a/src/test/ui/suggestions/dont-suggest-deref-inside-macro-issue-58298.stderr b/src/test/ui/suggestions/dont-suggest-deref-inside-macro-issue-58298.stderr index fe2583eafe505..f928510454ae3 100644 --- a/src/test/ui/suggestions/dont-suggest-deref-inside-macro-issue-58298.stderr +++ b/src/test/ui/suggestions/dont-suggest-deref-inside-macro-issue-58298.stderr @@ -4,10 +4,7 @@ error[E0308]: mismatched types LL | / intrinsic_match! { LL | | "abc" LL | | }; - | | ^ - | | | - | |______expected `&str`, found struct `std::string::String` - | in this macro invocation + | |______^ expected `&str`, found struct `std::string::String` | = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z macro-backtrace for more info) From 4c7eb59e8161fd7bd2da89fc8c8d73c32bcd789b Mon Sep 17 00:00:00 2001 From: Eduard-Mihai Burtescu Date: Mon, 16 Dec 2019 15:56:47 +0200 Subject: [PATCH 5/6] rustc_macros: don't limit the -Zmacro-backtrace suggestion to extern macros. --- src/librustc_errors/emitter.rs | 53 +++++++++----- .../rustdoc-ui/intra-links-warning.stderr | 1 + .../hash-stable-is-unstable.stderr | 1 + .../lint_pass_impl_without_macro.stderr | 1 + src/test/ui/allocator/not-an-allocator.stderr | 4 ++ src/test/ui/allocator/two-allocators.stderr | 2 + .../borrowck-borrowed-uniq-rvalue-2.stderr | 2 +- src/test/ui/borrowck/issue-64453.stderr | 2 +- .../ui/borrowck/move-error-snippets.stderr | 2 + .../ui/codemap_tests/bad-format-args.stderr | 2 +- src/test/ui/codemap_tests/issue-28308.stderr | 2 + .../cfg-attr-syntax-validation.stderr | 2 + ...r-unknown-attribute-macro-expansion.stderr | 2 + .../core-traits-no-impls-length-33.stderr | 1 + .../ui/const-generics/broken-mir-2.stderr | 1 + .../derive-debug-array-wrapper.stderr | 1 + .../const-eval/const_fn_ptr_fail2.stderr | 4 +- .../ui/consts/const-eval/const_panic.stderr | 6 +- .../const-eval/const_panic_libcore.stderr | 6 +- .../const_panic_libcore_main.stderr | 6 +- .../feature-gate-const_panic.stderr | 6 +- .../const-eval/panic-assoc-never-type.stderr | 2 +- .../consts/const-eval/panic-never-type.stderr | 2 +- .../const-external-macro-const-err.stderr | 2 +- .../ui/consts/control-flow/assert.both.stderr | 2 +- .../control-flow/assert.if_match.stderr | 4 +- .../consts/control-flow/assert.panic.stderr | 2 + .../consts/control-flow/assert.stock.stderr | 2 + .../control-flow/issue-50577.if_match.stderr | 2 +- .../control-flow/issue-50577.stock.stderr | 8 +-- .../control-flow/short-circuit.stock.stderr | 4 +- src/test/ui/consts/enum-discr-type-err.stderr | 2 + .../min_const_fn/bad_const_fn_body_ice.stderr | 2 +- .../cross-crate-macro-backtrace/main.stderr | 2 +- .../ui/cross/cross-file-errors/main.stderr | 2 + .../ui/custom_test_frameworks/mismatch.stderr | 1 + .../ui/deprecation/deprecation-lint-2.stderr | 2 +- .../ui/deprecation/deprecation-lint-3.stderr | 2 +- src/test/ui/deref-suggestion.stderr | 4 +- ...ives-span-Clone-enum-struct-variant.stderr | 1 + .../ui/derives/derives-span-Clone-enum.stderr | 1 + .../derives/derives-span-Clone-struct.stderr | 1 + .../derives-span-Clone-tuple-struct.stderr | 1 + ...ives-span-Debug-enum-struct-variant.stderr | 1 + .../ui/derives/derives-span-Debug-enum.stderr | 1 + .../derives/derives-span-Debug-struct.stderr | 1 + .../derives-span-Debug-tuple-struct.stderr | 1 + .../derives-span-Default-struct.stderr | 1 + .../derives-span-Default-tuple-struct.stderr | 1 + ...derives-span-Eq-enum-struct-variant.stderr | 1 + .../ui/derives/derives-span-Eq-enum.stderr | 1 + .../ui/derives/derives-span-Eq-struct.stderr | 1 + .../derives-span-Eq-tuple-struct.stderr | 1 + ...rives-span-Hash-enum-struct-variant.stderr | 2 + .../ui/derives/derives-span-Hash-enum.stderr | 2 + .../derives/derives-span-Hash-struct.stderr | 2 + .../derives-span-Hash-tuple-struct.stderr | 2 + ...erives-span-Ord-enum-struct-variant.stderr | 1 + .../ui/derives/derives-span-Ord-enum.stderr | 1 + .../ui/derives/derives-span-Ord-struct.stderr | 1 + .../derives-span-Ord-tuple-struct.stderr | 1 + ...-span-PartialEq-enum-struct-variant.stderr | 2 + .../derives-span-PartialEq-enum.stderr | 2 + .../derives-span-PartialEq-struct.stderr | 2 + ...derives-span-PartialEq-tuple-struct.stderr | 2 + ...span-PartialOrd-enum-struct-variant.stderr | 5 ++ .../derives-span-PartialOrd-enum.stderr | 5 ++ .../derives-span-PartialOrd-struct.stderr | 5 ++ ...erives-span-PartialOrd-tuple-struct.stderr | 5 ++ ...eriving-no-inner-impl-error-message.stderr | 3 + .../derives/deriving-with-repr-packed.stderr | 4 ++ .../ui/did_you_mean/bad-assoc-expr.stderr | 2 + src/test/ui/did_you_mean/bad-assoc-pat.stderr | 4 ++ src/test/ui/did_you_mean/bad-assoc-ty.stderr | 4 ++ .../did_you_mean/recursion_limit_macro.stderr | 1 + .../dollar-crate-is-keyword-2.stderr | 6 ++ .../dollar-crate-is-keyword.stderr | 8 +++ .../ui/editions/edition-imports-2015.stderr | 2 +- .../ui/editions/edition-imports-2018.stderr | 2 +- .../edition-imports-virtual-2015-gated.stderr | 2 +- ...dition-keywords-2015-2018-expansion.stderr | 2 +- ...dition-keywords-2018-2018-expansion.stderr | 2 +- src/test/ui/error-codes/E0184.stderr | 2 + src/test/ui/error-codes/E0665.stderr | 2 + src/test/ui/exclusive-drop-and-copy.stderr | 4 ++ ...-allow-internal-unsafe-nested-macro.stderr | 1 + ...llow-internal-unstable-nested-macro.stderr | 1 + .../feature-gate-concat_idents2.stderr | 2 + ...pats-inclusive-dotdotdot-bad-syntax.stderr | 2 + ...lf-open-range-pats-inclusive-no-end.stderr | 2 + ...pe.bound_a_b_ret_a_vs_bound_a_ret_a.stderr | 1 + .../hr-subtype.bound_a_b_vs_bound_a.stderr | 1 + .../hr-subtype.bound_a_vs_free_x.stderr | 1 + ...-subtype.bound_co_a_b_vs_bound_co_a.stderr | 1 + ...ubtype.bound_co_a_co_b_ret_contra_a.stderr | 1 + ...pe.bound_contra_a_contra_b_ret_co_a.stderr | 1 + ...ubtype.bound_inv_a_b_vs_bound_inv_a.stderr | 1 + ...ubtype.free_inv_x_vs_free_inv_y.nll.stderr | 2 + ...hr-subtype.free_inv_x_vs_free_inv_y.stderr | 2 + .../hr-subtype.free_x_vs_free_y.nll.stderr | 1 + .../hr-subtype.free_x_vs_free_y.stderr | 1 + src/test/ui/hygiene/assoc_item_ctxt.stderr | 4 ++ .../ui/hygiene/duplicate_lifetimes.stderr | 4 ++ .../extern-prelude-from-opaque-fail.stderr | 4 ++ src/test/ui/hygiene/fields-definition.stderr | 2 + src/test/ui/hygiene/fields-move.stderr | 1 + src/test/ui/hygiene/fields.stderr | 8 +++ src/test/ui/hygiene/generate-mod.stderr | 8 +++ src/test/ui/hygiene/globs.stderr | 3 + src/test/ui/hygiene/hygienic-label-1.stderr | 2 + src/test/ui/hygiene/hygienic-label-3.stderr | 2 + .../ui/hygiene/hygienic-labels-in-let.stderr | 32 +++++++++ src/test/ui/hygiene/hygienic-labels.stderr | 32 +++++++++ src/test/ui/hygiene/impl_items.stderr | 2 + src/test/ui/hygiene/intercrate.stderr | 2 +- .../ui/hygiene/no_implicit_prelude.stderr | 5 +- src/test/ui/hygiene/privacy-early.stderr | 1 + src/test/ui/hygiene/trait_items.stderr | 1 + src/test/ui/if/if-let.stderr | 3 + src/test/ui/if/ifmt-bad-arg.stderr | 2 + src/test/ui/if/ifmt-bad-format-args.stderr | 2 + src/test/ui/if/ifmt-unimpl.stderr | 1 + .../extern-prelude-extern-crate-fail.stderr | 2 + ...e-extern-crate-restricted-shadowing.stderr | 3 + src/test/ui/imports/import-crate-var.stderr | 2 +- .../ui/imports/import-prefix-macro-1.stderr | 2 + .../ui/imports/import-prefix-macro-2.stderr | 2 + .../local-modularized-tricky-fail-1.stderr | 4 ++ .../local-modularized-tricky-fail-2.stderr | 3 + .../local-modularized-tricky-fail-3.stderr | 2 + .../ui/imports/shadow_builtin_macros.stderr | 1 + .../in-band-lifetimes/elided-lifetimes.stderr | 4 ++ .../ui/include-macros/mismatched-types.stderr | 2 + .../infinite/infinite-macro-expansion.stderr | 1 + src/test/ui/inline-asm-bad-constraint.stderr | 6 ++ .../internal/internal-unstable-noallow.stderr | 8 +-- src/test/ui/internal/internal-unstable.stderr | 1 + src/test/ui/issues/issue-12997-2.stderr | 2 + src/test/ui/issues/issue-13446.stderr | 2 +- src/test/ui/issues/issue-14091-2.stderr | 1 + src/test/ui/issues/issue-15167.stderr | 8 +++ src/test/ui/issues/issue-16098.stderr | 1 + src/test/ui/issues/issue-16966.stderr | 2 +- src/test/ui/issues/issue-21160.stderr | 2 + src/test/ui/issues/issue-2150.stderr | 1 - src/test/ui/issues/issue-25385.stderr | 2 + src/test/ui/issues/issue-25386.stderr | 4 ++ src/test/ui/issues/issue-25793.stderr | 2 + src/test/ui/issues/issue-26093.stderr | 4 ++ src/test/ui/issues/issue-26094.stderr | 2 + src/test/ui/issues/issue-27340.stderr | 2 + src/test/ui/issues/issue-27592.stderr | 4 ++ src/test/ui/issues/issue-29084.stderr | 2 + src/test/ui/issues/issue-31011.stderr | 2 + src/test/ui/issues/issue-32655.stderr | 2 + src/test/ui/issues/issue-32782.stderr | 1 + src/test/ui/issues/issue-32829.stderr | 2 +- src/test/ui/issues/issue-32950.stderr | 2 + src/test/ui/issues/issue-34229.stderr | 5 ++ src/test/ui/issues/issue-34334.stderr | 2 +- src/test/ui/issues/issue-38821.stderr | 1 + src/test/ui/issues/issue-42954.stderr | 2 + src/test/ui/issues/issue-48364.stderr | 1 + src/test/ui/issues/issue-48728.stderr | 1 + src/test/ui/issues/issue-50480.stderr | 2 + src/test/ui/issues/issue-51848.stderr | 1 + src/test/ui/issues/issue-53251.stderr | 4 ++ src/test/ui/issues/issue-56411.stderr | 2 + src/test/ui/issues/issue-59488.stderr | 6 +- src/test/ui/issues/issue-6596-1.stderr | 2 + src/test/ui/issues/issue-6596-2.stderr | 2 + .../issue-68091-unicode-ident-after-if.stderr | 2 + .../lifetimes/borrowck-let-suggestion.stderr | 2 +- src/test/ui/lint/lint-stability2.stderr | 2 +- src/test/ui/lint/lint-stability3.stderr | 2 +- src/test/ui/lint/lint-unsafe-code.stderr | 2 + .../ui/lint/lints-in-foreign-macros.stderr | 1 + src/test/ui/lint/test-inner-fn.stderr | 3 + .../ui/lint/unreachable_pub-pub_crate.stderr | 1 + src/test/ui/lint/unreachable_pub.stderr | 1 + .../liveness-return-last-stmt-semi.stderr | 2 + src/test/ui/macros/assert.stderr | 2 +- src/test/ui/macros/cfg.stderr | 2 + .../derive-in-eager-expansion-hang.stderr | 1 + src/test/ui/macros/format-parse-errors.stderr | 2 +- src/test/ui/macros/issue-54441.stderr | 2 + .../macro-backtrace-invalid-internals.stderr | 14 ++++ .../ui/macros/macro-backtrace-nested.stderr | 4 ++ .../ui/macros/macro-backtrace-println.stderr | 2 + src/test/ui/macros/macro-context.stderr | 2 + .../macro-lifetime-used-with-labels.stderr | 2 + .../macros/macro-local-data-key-priv.stderr | 2 +- src/test/ui/macros/macro-shadowing.stderr | 2 + .../ui/macros/macros-nonfatal-errors.stderr | 6 ++ .../ui/macros/must-use-in-macro-55516.stderr | 2 +- .../ui/macros/nonterminal-matching.stderr | 2 + .../macros/restricted-shadowing-legacy.stderr | 8 +++ .../macros/restricted-shadowing-modern.stderr | 6 ++ src/test/ui/macros/same-sequence-span.stderr | 2 + .../ui/macros/span-covering-argument-1.stderr | 2 + src/test/ui/macros/trace_faulty_macros.stderr | 3 + .../malformed/malformed-derive-entry.stderr | 4 ++ .../malformed/malformed-interpolated.stderr | 4 ++ .../match/match-arm-resolving-to-never.stderr | 2 - .../method-on-ambiguous-numeric-type.stderr | 2 - .../ui/mismatched_types/issue-26480.stderr | 2 + .../missing/missing-semicolon-warning.stderr | 2 + .../feature-gate-never_type_fallback.stderr | 1 - .../never_type/never-assign-dead-code.stderr | 1 - src/test/ui/on-unimplemented/no-debug.stderr | 4 ++ src/test/ui/out-of-order-shadowing.stderr | 2 +- ...sue-65122-mac-invoc-in-mut-patterns.stderr | 4 ++ src/test/ui/parser/macro/issue-37113.stderr | 2 + src/test/ui/parser/macro/issue-37234.stderr | 2 + .../macro/macro-incomplete-parse.stderr | 2 + .../ui/parser/macro/pub-item-macro.stderr | 2 + .../parser/macro/trait-non-item-macros.stderr | 2 + src/test/ui/parser/mut-patterns.stderr | 2 + src/test/ui/parser/recover-range-pats.stderr | 6 ++ .../rest-pat-semantic-disallowed.stderr | 1 + .../associated-item-privacy-inherent.stderr | 42 +++++++++++ .../associated-item-privacy-trait.stderr | 70 +++++++++++++++++++ ...ssociated-item-privacy-type-binding.stderr | 32 +++++++++ .../ui/privacy/private-inferred-type-3.stderr | 14 ++-- .../ui/privacy/private-inferred-type.stderr | 12 ++++ src/test/ui/proc-macro/derive-bad.stderr | 2 + .../proc-macro/derive-helper-shadowing.stderr | 4 ++ src/test/ui/proc-macro/dollar-crate.stderr | 3 +- .../ui/proc-macro/expand-to-unstable-2.stderr | 1 + .../ui/proc-macro/expand-to-unstable.stderr | 1 + .../proc-macro/gen-macro-rules-hygiene.stderr | 4 ++ src/test/ui/proc-macro/generate-mod.stderr | 4 ++ .../proc-macro/invalid-punct-ident-4.stderr | 2 + src/test/ui/proc-macro/issue-38586.stderr | 2 + src/test/ui/proc-macro/issue-50493.stderr | 4 ++ .../issue-59191-replace-root-with-fn.stderr | 2 + .../ui/proc-macro/lints_in_proc_macros.stderr | 2 + src/test/ui/proc-macro/mixed-site-span.stderr | 5 ++ src/test/ui/proc-macro/multispan.stderr | 7 ++ .../ui/proc-macro/parent-source-spans.stderr | 18 +++++ src/test/ui/proc-macro/subspan.stderr | 8 +++ src/test/ui/proc-macro/three-equals.stderr | 1 + src/test/ui/range/range_traits-1.stderr | 36 ++++++++++ src/test/ui/range/range_traits-2.stderr | 2 + src/test/ui/range/range_traits-3.stderr | 2 + src/test/ui/range/range_traits-6.stderr | 2 + src/test/ui/reachable/expr_again.stderr | 2 +- src/test/ui/reachable/expr_block.stderr | 2 +- src/test/ui/reachable/expr_if.stderr | 2 +- src/test/ui/reachable/expr_loop.stderr | 6 +- src/test/ui/reachable/expr_match.stderr | 4 +- .../regions-var-type-out-of-scope.stderr | 1 - .../termination-trait-test-wrong-type.stderr | 1 + .../dbg-macro-move-semantics.stderr | 2 - .../dbg-macro-requires-debug.stderr | 2 +- .../suggestions-not-always-applicable.stderr | 2 + .../ambiguity-macros-nested.stderr | 1 + .../uniform-paths/ambiguity-macros.stderr | 1 + src/test/ui/span/E0204.stderr | 4 ++ src/test/ui/span/coerce-suggestions.stderr | 2 +- src/test/ui/span/issue-33884.stderr | 2 +- .../ui/span/macro-span-replacement.stderr | 1 + src/test/ui/span/slice-borrow.stderr | 2 +- ...gest-deref-inside-macro-issue-58298.stderr | 2 +- .../dont-suggest-try_into-in-macros.stderr | 2 +- .../mut-borrow-needed-by-trait.stderr | 2 +- src/test/ui/suggestions/path-display.stderr | 1 + .../suggestions/vec-macro-in-pattern.stderr | 2 +- src/test/ui/trace_macros-gate.stderr | 1 + .../ui/try-block/try-block-opt-init.stderr | 2 +- .../ui/tuple/tuple-struct-fields/test2.stderr | 2 + .../ui/tuple/tuple-struct-fields/test3.stderr | 2 + .../ui/type/ascription/issue-47666.stderr | 2 +- .../cannot_infer_local_or_vec.stderr | 2 +- ...cannot_infer_local_or_vec_in_tuples.stderr | 2 +- src/test/ui/union/union-derive-clone.stderr | 1 + src/test/ui/union/union-derive-eq.stderr | 1 + src/test/ui/unreachable-code-ret.stderr | 2 +- src/test/ui/unused/unused-macro-rules.stderr | 2 + src/test/ui/while-let.stderr | 3 + 280 files changed, 888 insertions(+), 119 deletions(-) diff --git a/src/librustc_errors/emitter.rs b/src/librustc_errors/emitter.rs index 4857ff47462c8..f3653da4be666 100644 --- a/src/librustc_errors/emitter.rs +++ b/src/librustc_errors/emitter.rs @@ -26,6 +26,7 @@ use std::borrow::Cow; use std::cmp::{max, min, Reverse}; use std::io; use std::io::prelude::*; +use std::iter; use std::path::Path; use termcolor::{Ansi, BufferWriter, ColorChoice, ColorSpec, StandardStream}; use termcolor::{Buffer, Color, WriteColor}; @@ -279,20 +280,41 @@ pub trait Emitter { level: &Level, backtrace: bool, ) { - let mut external_spans_updated = false; + // Check for spans in macros, before `fix_multispans_in_extern_macros` + // has a chance to replace them. + let has_macro_spans = iter::once(&*span) + .chain(children.iter().map(|child| &child.span)) + .flat_map(|span| span.primary_spans()) + .copied() + .flat_map(|sp| { + sp.macro_backtrace().filter_map(|expn_data| { + match expn_data.kind { + ExpnKind::Root => None, + + // Skip past non-macro entries, just in case there + // are some which do actually involve macros. + ExpnKind::Desugaring(..) | ExpnKind::AstPass(..) => None, + + ExpnKind::Macro(macro_kind, _) => Some(macro_kind), + } + }) + }) + .next(); + if !backtrace { - external_spans_updated = - self.fix_multispans_in_extern_macros(source_map, span, children); + self.fix_multispans_in_extern_macros(source_map, span, children); } self.render_multispans_macro_backtrace(span, children, backtrace); if !backtrace { - if external_spans_updated { + if let Some(macro_kind) = has_macro_spans { let msg = format!( - "this {} originates in a macro outside of the current crate \ + "this {} originates in {} {} \ (in Nightly builds, run with -Z macro-backtrace for more info)", level, + macro_kind.article(), + macro_kind.descr(), ); children.push(SubDiagnostic { @@ -311,9 +333,8 @@ pub trait Emitter { children: &mut Vec, backtrace: bool, ) { - self.render_multispan_macro_backtrace(span, backtrace); - for child in children.iter_mut() { - self.render_multispan_macro_backtrace(&mut child.span, backtrace); + for span in iter::once(span).chain(children.iter_mut().map(|child| &mut child.span)) { + self.render_multispan_macro_backtrace(span, backtrace); } } @@ -386,6 +407,7 @@ pub trait Emitter { } } } + for (label_span, label_text) in new_labels { span.push_span_label(label_span, label_text); } @@ -399,12 +421,10 @@ pub trait Emitter { source_map: &Option>, span: &mut MultiSpan, children: &mut Vec, - ) -> bool { - let mut spans_updated = self.fix_multispan_in_extern_macros(source_map, span); - for child in children.iter_mut() { - spans_updated |= self.fix_multispan_in_extern_macros(source_map, &mut child.span); + ) { + for span in iter::once(span).chain(children.iter_mut().map(|child| &mut child.span)) { + self.fix_multispan_in_extern_macros(source_map, span); } - spans_updated } // This "fixes" MultiSpans that contain Spans that are pointing to locations inside of @@ -414,10 +434,10 @@ pub trait Emitter { &self, source_map: &Option>, span: &mut MultiSpan, - ) -> bool { + ) { let sm = match source_map { Some(ref sm) => sm, - None => return false, + None => return, }; // First, find all the spans in <*macros> and point instead at their use site @@ -438,12 +458,9 @@ pub trait Emitter { .collect(); // After we have them, make sure we replace these 'bad' def sites with their use sites - let spans_updated = !replacements.is_empty(); for (from, to) in replacements { span.replace(from, to); } - - spans_updated } } diff --git a/src/test/rustdoc-ui/intra-links-warning.stderr b/src/test/rustdoc-ui/intra-links-warning.stderr index 5f1c9cfbc367a..91b1fff5a3a07 100644 --- a/src/test/rustdoc-ui/intra-links-warning.stderr +++ b/src/test/rustdoc-ui/intra-links-warning.stderr @@ -175,4 +175,5 @@ LL | f!("Foo\nbar [BarF] bar\nbaz"); bar [BarF] bar ^^^^ = help: to escape `[` and `]` characters, just add '\' before them like `\[` or `\]` + = note: this warning originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) diff --git a/src/test/ui-fulldeps/hash-stable-is-unstable.stderr b/src/test/ui-fulldeps/hash-stable-is-unstable.stderr index e2dc0c3be725f..73b48013de665 100644 --- a/src/test/ui-fulldeps/hash-stable-is-unstable.stderr +++ b/src/test/ui-fulldeps/hash-stable-is-unstable.stderr @@ -42,6 +42,7 @@ LL | #[derive(HashStable)] | = note: for more information, see https://github.com/rust-lang/rust/issues/27812 = help: add `#![feature(rustc_private)]` to the crate attributes to enable + = note: this error originates in a derive macro (in Nightly builds, run with -Z macro-backtrace for more info) error: aborting due to 5 previous errors diff --git a/src/test/ui-fulldeps/internal-lints/lint_pass_impl_without_macro.stderr b/src/test/ui-fulldeps/internal-lints/lint_pass_impl_without_macro.stderr index 966a747a1c9f4..fe920dba3978e 100644 --- a/src/test/ui-fulldeps/internal-lints/lint_pass_impl_without_macro.stderr +++ b/src/test/ui-fulldeps/internal-lints/lint_pass_impl_without_macro.stderr @@ -21,6 +21,7 @@ LL | custom_lint_pass_macro!(); | -------------------------- in this macro invocation | = help: try using `declare_lint_pass!` or `impl_lint_pass!` instead + = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) error: aborting due to 2 previous errors diff --git a/src/test/ui/allocator/not-an-allocator.stderr b/src/test/ui/allocator/not-an-allocator.stderr index dd2cf36ff1b83..0d52a23c1f398 100644 --- a/src/test/ui/allocator/not-an-allocator.stderr +++ b/src/test/ui/allocator/not-an-allocator.stderr @@ -5,6 +5,7 @@ LL | static A: usize = 0; | ^^^^^^^^^^^^^^^^^^^^ the trait `std::alloc::GlobalAlloc` is not implemented for `usize` | = note: required by `std::alloc::GlobalAlloc::alloc` + = note: this error originates in an attribute macro (in Nightly builds, run with -Z macro-backtrace for more info) error[E0277]: the trait bound `usize: std::alloc::GlobalAlloc` is not satisfied --> $DIR/not-an-allocator.rs:2:1 @@ -13,6 +14,7 @@ LL | static A: usize = 0; | ^^^^^^^^^^^^^^^^^^^^ the trait `std::alloc::GlobalAlloc` is not implemented for `usize` | = note: required by `std::alloc::GlobalAlloc::dealloc` + = note: this error originates in an attribute macro (in Nightly builds, run with -Z macro-backtrace for more info) error[E0277]: the trait bound `usize: std::alloc::GlobalAlloc` is not satisfied --> $DIR/not-an-allocator.rs:2:1 @@ -21,6 +23,7 @@ LL | static A: usize = 0; | ^^^^^^^^^^^^^^^^^^^^ the trait `std::alloc::GlobalAlloc` is not implemented for `usize` | = note: required by `std::alloc::GlobalAlloc::realloc` + = note: this error originates in an attribute macro (in Nightly builds, run with -Z macro-backtrace for more info) error[E0277]: the trait bound `usize: std::alloc::GlobalAlloc` is not satisfied --> $DIR/not-an-allocator.rs:2:1 @@ -29,6 +32,7 @@ LL | static A: usize = 0; | ^^^^^^^^^^^^^^^^^^^^ the trait `std::alloc::GlobalAlloc` is not implemented for `usize` | = note: required by `std::alloc::GlobalAlloc::alloc_zeroed` + = note: this error originates in an attribute macro (in Nightly builds, run with -Z macro-backtrace for more info) error: aborting due to 4 previous errors diff --git a/src/test/ui/allocator/two-allocators.stderr b/src/test/ui/allocator/two-allocators.stderr index da636a5a567f3..1b46825c5425c 100644 --- a/src/test/ui/allocator/two-allocators.stderr +++ b/src/test/ui/allocator/two-allocators.stderr @@ -6,6 +6,8 @@ LL | static A: System = System; LL | #[global_allocator] LL | static B: System = System; | ^^^^^^^^^^^^^^^^^^^^^^^^^^ cannot define a new global allocator + | + = note: this error originates in an attribute macro (in Nightly builds, run with -Z macro-backtrace for more info) error: aborting due to previous error diff --git a/src/test/ui/borrowck/borrowck-borrowed-uniq-rvalue-2.stderr b/src/test/ui/borrowck/borrowck-borrowed-uniq-rvalue-2.stderr index d0250d862fcc4..bdb073cdcbcc9 100644 --- a/src/test/ui/borrowck/borrowck-borrowed-uniq-rvalue-2.stderr +++ b/src/test/ui/borrowck/borrowck-borrowed-uniq-rvalue-2.stderr @@ -9,7 +9,7 @@ LL | x.x[0]; | ------ borrow later used here | = note: consider using a `let` binding to create a longer lived value - = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z macro-backtrace for more info) + = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) error: aborting due to previous error diff --git a/src/test/ui/borrowck/issue-64453.stderr b/src/test/ui/borrowck/issue-64453.stderr index 3a7f13f5bba8c..edc496aa2f81b 100644 --- a/src/test/ui/borrowck/issue-64453.stderr +++ b/src/test/ui/borrowck/issue-64453.stderr @@ -6,7 +6,7 @@ LL | static settings_dir: String = format!(""); | = note: for more information, see https://github.com/rust-lang/rust/issues/49146 = help: add `#![feature(const_if_match)]` to the crate attributes to enable - = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z macro-backtrace for more info) + = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) error: aborting due to previous error diff --git a/src/test/ui/borrowck/move-error-snippets.stderr b/src/test/ui/borrowck/move-error-snippets.stderr index 77463c48591bc..e0acd45957145 100644 --- a/src/test/ui/borrowck/move-error-snippets.stderr +++ b/src/test/ui/borrowck/move-error-snippets.stderr @@ -9,6 +9,8 @@ LL | aaa!(D); ... LL | sss!(); | ------- in this macro invocation + | + = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) error: aborting due to previous error diff --git a/src/test/ui/codemap_tests/bad-format-args.stderr b/src/test/ui/codemap_tests/bad-format-args.stderr index 66ff9508db796..96d7b07b0e253 100644 --- a/src/test/ui/codemap_tests/bad-format-args.stderr +++ b/src/test/ui/codemap_tests/bad-format-args.stderr @@ -4,7 +4,7 @@ error: requires at least a format string argument LL | format!(); | ^^^^^^^^^^ | - = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z macro-backtrace for more info) + = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) error: expected token: `,` --> $DIR/bad-format-args.rs:3:16 diff --git a/src/test/ui/codemap_tests/issue-28308.stderr b/src/test/ui/codemap_tests/issue-28308.stderr index d44c157003dfb..f8820b9efedfc 100644 --- a/src/test/ui/codemap_tests/issue-28308.stderr +++ b/src/test/ui/codemap_tests/issue-28308.stderr @@ -3,6 +3,8 @@ error[E0600]: cannot apply unary operator `!` to type `&'static str` | LL | assert!("foo"); | ^^^^^^^^^^^^^^^ cannot apply unary operator `!` + | + = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) error: aborting due to previous error diff --git a/src/test/ui/conditional-compilation/cfg-attr-syntax-validation.stderr b/src/test/ui/conditional-compilation/cfg-attr-syntax-validation.stderr index 5bfe9e902dae8..44063dd1d65d7 100644 --- a/src/test/ui/conditional-compilation/cfg-attr-syntax-validation.stderr +++ b/src/test/ui/conditional-compilation/cfg-attr-syntax-validation.stderr @@ -60,6 +60,8 @@ LL | #[cfg(feature = $expr)] ... LL | generate_s10!(concat!("nonexistent")); | -------------------------------------- in this macro invocation + | + = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) error: aborting due to 10 previous errors diff --git a/src/test/ui/conditional-compilation/cfg-attr-unknown-attribute-macro-expansion.stderr b/src/test/ui/conditional-compilation/cfg-attr-unknown-attribute-macro-expansion.stderr index ef434ec82610e..330ce2bd2e1b5 100644 --- a/src/test/ui/conditional-compilation/cfg-attr-unknown-attribute-macro-expansion.stderr +++ b/src/test/ui/conditional-compilation/cfg-attr-unknown-attribute-macro-expansion.stderr @@ -6,6 +6,8 @@ LL | #[cfg_attr(all(), unknown)] ... LL | foo!(); | ------- in this macro invocation + | + = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) error: aborting due to previous error diff --git a/src/test/ui/const-generics/array-impls/core-traits-no-impls-length-33.stderr b/src/test/ui/const-generics/array-impls/core-traits-no-impls-length-33.stderr index d885c98dcb287..cba71db86a964 100644 --- a/src/test/ui/const-generics/array-impls/core-traits-no-impls-length-33.stderr +++ b/src/test/ui/const-generics/array-impls/core-traits-no-impls-length-33.stderr @@ -6,6 +6,7 @@ LL | println!("{:?}", [0_usize; 33]); | = note: required because of the requirements on the impl of `std::fmt::Debug` for `[usize; 33]` = note: required by `std::fmt::Debug::fmt` + = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) error[E0277]: arrays only have std trait implementations for lengths 0..=32 --> $DIR/core-traits-no-impls-length-33.rs:10:16 diff --git a/src/test/ui/const-generics/broken-mir-2.stderr b/src/test/ui/const-generics/broken-mir-2.stderr index b72bc6a46a056..7d95b46790d65 100644 --- a/src/test/ui/const-generics/broken-mir-2.stderr +++ b/src/test/ui/const-generics/broken-mir-2.stderr @@ -15,6 +15,7 @@ LL | struct S([T; N]); = note: required because of the requirements on the impl of `std::fmt::Debug` for `[T; _]` = note: required because of the requirements on the impl of `std::fmt::Debug` for `&[T; _]` = note: required for the cast to the object type `dyn std::fmt::Debug` + = note: this error originates in a derive macro (in Nightly builds, run with -Z macro-backtrace for more info) error: aborting due to previous error diff --git a/src/test/ui/const-generics/derive-debug-array-wrapper.stderr b/src/test/ui/const-generics/derive-debug-array-wrapper.stderr index 08a9037a207b3..c4aef4c9d4785 100644 --- a/src/test/ui/const-generics/derive-debug-array-wrapper.stderr +++ b/src/test/ui/const-generics/derive-debug-array-wrapper.stderr @@ -15,6 +15,7 @@ LL | a: [u32; N], = note: required because of the requirements on the impl of `std::fmt::Debug` for `[u32; _]` = note: required because of the requirements on the impl of `std::fmt::Debug` for `&[u32; _]` = note: required for the cast to the object type `dyn std::fmt::Debug` + = note: this error originates in a derive macro (in Nightly builds, run with -Z macro-backtrace for more info) error: aborting due to previous error diff --git a/src/test/ui/consts/const-eval/const_fn_ptr_fail2.stderr b/src/test/ui/consts/const-eval/const_fn_ptr_fail2.stderr index 15dd84fa7ed3f..4c3ebece0a839 100644 --- a/src/test/ui/consts/const-eval/const_fn_ptr_fail2.stderr +++ b/src/test/ui/consts/const-eval/const_fn_ptr_fail2.stderr @@ -12,7 +12,7 @@ LL | assert_eq!(Y, 4); | | | referenced constant has errors | - = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z macro-backtrace for more info) + = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) error[E0080]: evaluation of constant expression failed --> $DIR/const_fn_ptr_fail2.rs:22:5 @@ -22,7 +22,7 @@ LL | assert_eq!(Z, 4); | | | referenced constant has errors | - = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z macro-backtrace for more info) + = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) error: aborting due to 2 previous errors diff --git a/src/test/ui/consts/const-eval/const_panic.stderr b/src/test/ui/consts/const-eval/const_panic.stderr index bbbe70510306e..679d8f280cc60 100644 --- a/src/test/ui/consts/const-eval/const_panic.stderr +++ b/src/test/ui/consts/const-eval/const_panic.stderr @@ -7,7 +7,7 @@ LL | pub const Z: () = panic!("cheese"); | the evaluated program panicked at 'cheese', $DIR/const_panic.rs:4:19 | = note: `#[deny(const_err)]` on by default - = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z macro-backtrace for more info) + = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) error: any use of this value will cause an error --> $DIR/const_panic.rs:7:19 @@ -17,7 +17,7 @@ LL | pub const Y: () = unreachable!(); | | | the evaluated program panicked at 'internal error: entered unreachable code', $DIR/const_panic.rs:7:19 | - = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z macro-backtrace for more info) + = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) error: any use of this value will cause an error --> $DIR/const_panic.rs:10:19 @@ -27,7 +27,7 @@ LL | pub const X: () = unimplemented!(); | | | the evaluated program panicked at 'not implemented', $DIR/const_panic.rs:10:19 | - = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z macro-backtrace for more info) + = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) error: aborting due to 3 previous errors diff --git a/src/test/ui/consts/const-eval/const_panic_libcore.stderr b/src/test/ui/consts/const-eval/const_panic_libcore.stderr index cedeabeadeb59..2abf158aade54 100644 --- a/src/test/ui/consts/const-eval/const_panic_libcore.stderr +++ b/src/test/ui/consts/const-eval/const_panic_libcore.stderr @@ -7,7 +7,7 @@ LL | const Z: () = panic!("cheese"); | the evaluated program panicked at 'cheese', $DIR/const_panic_libcore.rs:5:15 | = note: `#[deny(const_err)]` on by default - = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z macro-backtrace for more info) + = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) error: any use of this value will cause an error --> $DIR/const_panic_libcore.rs:8:15 @@ -17,7 +17,7 @@ LL | const Y: () = unreachable!(); | | | the evaluated program panicked at 'internal error: entered unreachable code', $DIR/const_panic_libcore.rs:8:15 | - = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z macro-backtrace for more info) + = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) error: any use of this value will cause an error --> $DIR/const_panic_libcore.rs:11:15 @@ -27,7 +27,7 @@ LL | const X: () = unimplemented!(); | | | the evaluated program panicked at 'not implemented', $DIR/const_panic_libcore.rs:11:15 | - = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z macro-backtrace for more info) + = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) error: aborting due to 3 previous errors diff --git a/src/test/ui/consts/const-eval/const_panic_libcore_main.stderr b/src/test/ui/consts/const-eval/const_panic_libcore_main.stderr index 3e8bea4d069ba..c5887ff8c5697 100644 --- a/src/test/ui/consts/const-eval/const_panic_libcore_main.stderr +++ b/src/test/ui/consts/const-eval/const_panic_libcore_main.stderr @@ -7,7 +7,7 @@ LL | const Z: () = panic!("cheese"); | the evaluated program panicked at 'cheese', $DIR/const_panic_libcore_main.rs:9:15 | = note: `#[deny(const_err)]` on by default - = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z macro-backtrace for more info) + = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) error: any use of this value will cause an error --> $DIR/const_panic_libcore_main.rs:12:15 @@ -17,7 +17,7 @@ LL | const Y: () = unreachable!(); | | | the evaluated program panicked at 'internal error: entered unreachable code', $DIR/const_panic_libcore_main.rs:12:15 | - = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z macro-backtrace for more info) + = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) error: any use of this value will cause an error --> $DIR/const_panic_libcore_main.rs:15:15 @@ -27,7 +27,7 @@ LL | const X: () = unimplemented!(); | | | the evaluated program panicked at 'not implemented', $DIR/const_panic_libcore_main.rs:15:15 | - = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z macro-backtrace for more info) + = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) error: aborting due to 3 previous errors diff --git a/src/test/ui/consts/const-eval/feature-gate-const_panic.stderr b/src/test/ui/consts/const-eval/feature-gate-const_panic.stderr index e3b20e4147ab3..82edcefb86e7f 100644 --- a/src/test/ui/consts/const-eval/feature-gate-const_panic.stderr +++ b/src/test/ui/consts/const-eval/feature-gate-const_panic.stderr @@ -6,7 +6,7 @@ LL | const Z: () = panic!("cheese"); | = note: for more information, see https://github.com/rust-lang/rust/issues/51999 = help: add `#![feature(const_panic)]` to the crate attributes to enable - = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z macro-backtrace for more info) + = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) error[E0658]: panicking in constants is unstable --> $DIR/feature-gate-const_panic.rs:9:15 @@ -16,7 +16,7 @@ LL | const X: () = unimplemented!(); | = note: for more information, see https://github.com/rust-lang/rust/issues/51999 = help: add `#![feature(const_panic)]` to the crate attributes to enable - = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z macro-backtrace for more info) + = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) error[E0658]: panicking in constants is unstable --> $DIR/feature-gate-const_panic.rs:6:15 @@ -26,7 +26,7 @@ LL | const Y: () = unreachable!(); | = note: for more information, see https://github.com/rust-lang/rust/issues/51999 = help: add `#![feature(const_panic)]` to the crate attributes to enable - = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z macro-backtrace for more info) + = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) error: aborting due to 3 previous errors diff --git a/src/test/ui/consts/const-eval/panic-assoc-never-type.stderr b/src/test/ui/consts/const-eval/panic-assoc-never-type.stderr index 1cdbe6c887f6d..ea4eba89eb7fc 100644 --- a/src/test/ui/consts/const-eval/panic-assoc-never-type.stderr +++ b/src/test/ui/consts/const-eval/panic-assoc-never-type.stderr @@ -11,7 +11,7 @@ note: the lint level is defined here | LL | #![warn(const_err)] | ^^^^^^^^^ - = note: this warning originates in a macro outside of the current crate (in Nightly builds, run with -Z macro-backtrace for more info) + = note: this warning originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) error[E0080]: erroneous constant used --> $DIR/panic-assoc-never-type.rs:16:13 diff --git a/src/test/ui/consts/const-eval/panic-never-type.stderr b/src/test/ui/consts/const-eval/panic-never-type.stderr index ae142897b3704..28333c511dca4 100644 --- a/src/test/ui/consts/const-eval/panic-never-type.stderr +++ b/src/test/ui/consts/const-eval/panic-never-type.stderr @@ -11,7 +11,7 @@ note: the lint level is defined here | LL | #![warn(const_err)] | ^^^^^^^^^ - = note: this warning originates in a macro outside of the current crate (in Nightly builds, run with -Z macro-backtrace for more info) + = note: this warning originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) error[E0080]: erroneous constant used --> $DIR/panic-never-type.rs:12:13 diff --git a/src/test/ui/consts/const-external-macro-const-err.stderr b/src/test/ui/consts/const-external-macro-const-err.stderr index c3808391c7822..06a630d82d840 100644 --- a/src/test/ui/consts/const-external-macro-const-err.stderr +++ b/src/test/ui/consts/const-external-macro-const-err.stderr @@ -5,7 +5,7 @@ LL | static_assert!(2 + 2 == 5); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ index out of bounds: the len is 1 but the index is 1 | = note: `#[deny(const_err)]` on by default - = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z macro-backtrace for more info) + = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) error: aborting due to previous error diff --git a/src/test/ui/consts/control-flow/assert.both.stderr b/src/test/ui/consts/control-flow/assert.both.stderr index e0e3df1193f55..7dd60cfb5458f 100644 --- a/src/test/ui/consts/control-flow/assert.both.stderr +++ b/src/test/ui/consts/control-flow/assert.both.stderr @@ -7,7 +7,7 @@ LL | const _: () = assert!(false); | the evaluated program panicked at 'assertion failed: false', $DIR/assert.rs:12:15 | = note: `#[deny(const_err)]` on by default - = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z macro-backtrace for more info) + = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) error: aborting due to previous error diff --git a/src/test/ui/consts/control-flow/assert.if_match.stderr b/src/test/ui/consts/control-flow/assert.if_match.stderr index 3f4719b681cbd..476cf89edf059 100644 --- a/src/test/ui/consts/control-flow/assert.if_match.stderr +++ b/src/test/ui/consts/control-flow/assert.if_match.stderr @@ -6,7 +6,7 @@ LL | const _: () = assert!(true); | = note: for more information, see https://github.com/rust-lang/rust/issues/51999 = help: add `#![feature(const_panic)]` to the crate attributes to enable - = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z macro-backtrace for more info) + = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) error[E0658]: panicking in constants is unstable --> $DIR/assert.rs:12:15 @@ -16,7 +16,7 @@ LL | const _: () = assert!(false); | = note: for more information, see https://github.com/rust-lang/rust/issues/51999 = help: add `#![feature(const_panic)]` to the crate attributes to enable - = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z macro-backtrace for more info) + = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) error: aborting due to 2 previous errors diff --git a/src/test/ui/consts/control-flow/assert.panic.stderr b/src/test/ui/consts/control-flow/assert.panic.stderr index 11550bf801ab0..043efa038aaa4 100644 --- a/src/test/ui/consts/control-flow/assert.panic.stderr +++ b/src/test/ui/consts/control-flow/assert.panic.stderr @@ -6,6 +6,7 @@ LL | const _: () = assert!(true); | = note: for more information, see https://github.com/rust-lang/rust/issues/49146 = help: add `#![feature(const_if_match)]` to the crate attributes to enable + = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) error[E0658]: `if` is not allowed in a `const` --> $DIR/assert.rs:12:15 @@ -15,6 +16,7 @@ LL | const _: () = assert!(false); | = note: for more information, see https://github.com/rust-lang/rust/issues/49146 = help: add `#![feature(const_if_match)]` to the crate attributes to enable + = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) error: aborting due to 2 previous errors diff --git a/src/test/ui/consts/control-flow/assert.stock.stderr b/src/test/ui/consts/control-flow/assert.stock.stderr index 11550bf801ab0..043efa038aaa4 100644 --- a/src/test/ui/consts/control-flow/assert.stock.stderr +++ b/src/test/ui/consts/control-flow/assert.stock.stderr @@ -6,6 +6,7 @@ LL | const _: () = assert!(true); | = note: for more information, see https://github.com/rust-lang/rust/issues/49146 = help: add `#![feature(const_if_match)]` to the crate attributes to enable + = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) error[E0658]: `if` is not allowed in a `const` --> $DIR/assert.rs:12:15 @@ -15,6 +16,7 @@ LL | const _: () = assert!(false); | = note: for more information, see https://github.com/rust-lang/rust/issues/49146 = help: add `#![feature(const_if_match)]` to the crate attributes to enable + = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) error: aborting due to 2 previous errors diff --git a/src/test/ui/consts/control-flow/issue-50577.if_match.stderr b/src/test/ui/consts/control-flow/issue-50577.if_match.stderr index 5a7f10e2ee40a..831360d5652e8 100644 --- a/src/test/ui/consts/control-flow/issue-50577.if_match.stderr +++ b/src/test/ui/consts/control-flow/issue-50577.if_match.stderr @@ -9,7 +9,7 @@ LL | Drop = assert_eq!(1, 1) | = note: `if` expressions without `else` evaluate to `()` = help: consider adding an `else` block that evaluates to the expected type - = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z macro-backtrace for more info) + = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) error: aborting due to previous error diff --git a/src/test/ui/consts/control-flow/issue-50577.stock.stderr b/src/test/ui/consts/control-flow/issue-50577.stock.stderr index 1eeda43b41c30..523bd23258f1e 100644 --- a/src/test/ui/consts/control-flow/issue-50577.stock.stderr +++ b/src/test/ui/consts/control-flow/issue-50577.stock.stderr @@ -6,7 +6,7 @@ LL | Drop = assert_eq!(1, 1) | = note: for more information, see https://github.com/rust-lang/rust/issues/49146 = help: add `#![feature(const_if_match)]` to the crate attributes to enable - = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z macro-backtrace for more info) + = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) error[E0658]: `if` is not allowed in a `const` --> $DIR/issue-50577.rs:7:16 @@ -16,7 +16,7 @@ LL | Drop = assert_eq!(1, 1) | = note: for more information, see https://github.com/rust-lang/rust/issues/49146 = help: add `#![feature(const_if_match)]` to the crate attributes to enable - = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z macro-backtrace for more info) + = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) error[E0658]: `match` is not allowed in a `const` --> $DIR/issue-50577.rs:7:16 @@ -26,7 +26,7 @@ LL | Drop = assert_eq!(1, 1) | = note: for more information, see https://github.com/rust-lang/rust/issues/49146 = help: add `#![feature(const_if_match)]` to the crate attributes to enable - = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z macro-backtrace for more info) + = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) error[E0317]: `if` may be missing an `else` clause --> $DIR/issue-50577.rs:7:16 @@ -39,7 +39,7 @@ LL | Drop = assert_eq!(1, 1) | = note: `if` expressions without `else` evaluate to `()` = help: consider adding an `else` block that evaluates to the expected type - = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z macro-backtrace for more info) + = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) error: aborting due to 4 previous errors diff --git a/src/test/ui/consts/control-flow/short-circuit.stock.stderr b/src/test/ui/consts/control-flow/short-circuit.stock.stderr index 6fcb7cafff284..f32f248af4557 100644 --- a/src/test/ui/consts/control-flow/short-circuit.stock.stderr +++ b/src/test/ui/consts/control-flow/short-circuit.stock.stderr @@ -7,7 +7,7 @@ LL | const _: bool = true || panic!(); | the evaluated program panicked at 'explicit panic', $DIR/short-circuit.rs:10:25 | = note: `#[deny(const_err)]` on by default - = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z macro-backtrace for more info) + = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) error: any use of this value will cause an error --> $DIR/short-circuit.rs:11:26 @@ -17,7 +17,7 @@ LL | const _: bool = false && panic!(); | | | the evaluated program panicked at 'explicit panic', $DIR/short-circuit.rs:11:26 | - = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z macro-backtrace for more info) + = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) error: aborting due to 2 previous errors diff --git a/src/test/ui/consts/enum-discr-type-err.stderr b/src/test/ui/consts/enum-discr-type-err.stderr index 9935f88e5b577..492b79e2e6021 100644 --- a/src/test/ui/consts/enum-discr-type-err.stderr +++ b/src/test/ui/consts/enum-discr-type-err.stderr @@ -10,6 +10,7 @@ LL | | B = T, LL | | } | |_- in this macro invocation | + = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) help: you can convert an `i32` to `isize` and panic if the converted value wouldn't fit | LL | $( $v = $s::V.try_into().unwrap(), )* @@ -27,6 +28,7 @@ LL | | B = T, LL | | } | |_- in this macro invocation | + = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) help: you can convert an `i32` to `isize` and panic if the converted value wouldn't fit | LL | $( $v = $s::V.try_into().unwrap(), )* diff --git a/src/test/ui/consts/min_const_fn/bad_const_fn_body_ice.stderr b/src/test/ui/consts/min_const_fn/bad_const_fn_body_ice.stderr index 9786e2e353cca..2c68ddd8c9a4d 100644 --- a/src/test/ui/consts/min_const_fn/bad_const_fn_body_ice.stderr +++ b/src/test/ui/consts/min_const_fn/bad_const_fn_body_ice.stderr @@ -6,7 +6,7 @@ LL | vec![1, 2, 3] | = note: for more information, see issue https://github.com/rust-lang/rust/issues/57563 = help: add `#![feature(const_fn)]` to the crate attributes to enable - = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z macro-backtrace for more info) + = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) error: aborting due to previous error diff --git a/src/test/ui/cross/cross-crate-macro-backtrace/main.stderr b/src/test/ui/cross/cross-crate-macro-backtrace/main.stderr index 4421ce9c7d331..9f58f16c1a02a 100644 --- a/src/test/ui/cross/cross-crate-macro-backtrace/main.stderr +++ b/src/test/ui/cross/cross-crate-macro-backtrace/main.stderr @@ -4,7 +4,7 @@ error: 1 positional argument in format string, but no arguments were given LL | myprintln!("{}"); | ^^^^^^^^^^^^^^^^^ | - = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z macro-backtrace for more info) + = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) error: aborting due to previous error diff --git a/src/test/ui/cross/cross-file-errors/main.stderr b/src/test/ui/cross/cross-file-errors/main.stderr index 7fd91eb1d6637..f9101d8a583d3 100644 --- a/src/test/ui/cross/cross-file-errors/main.stderr +++ b/src/test/ui/cross/cross-file-errors/main.stderr @@ -8,6 +8,8 @@ LL | _ | LL | underscore!(); | -------------- in this macro invocation + | + = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) error: aborting due to previous error diff --git a/src/test/ui/custom_test_frameworks/mismatch.stderr b/src/test/ui/custom_test_frameworks/mismatch.stderr index 9e2688c6393c1..420ddbc3def41 100644 --- a/src/test/ui/custom_test_frameworks/mismatch.stderr +++ b/src/test/ui/custom_test_frameworks/mismatch.stderr @@ -5,6 +5,7 @@ LL | fn wrong_kind(){} | ^^^^^^^^^^^^^^^^^ the trait `example_runner::Testable` is not implemented for `test::TestDescAndFn` | = note: required for the cast to the object type `dyn example_runner::Testable` + = note: this error originates in an attribute macro (in Nightly builds, run with -Z macro-backtrace for more info) error: aborting due to previous error diff --git a/src/test/ui/deprecation/deprecation-lint-2.stderr b/src/test/ui/deprecation/deprecation-lint-2.stderr index 1f9c5e3d7690b..65152a2f9ab6d 100644 --- a/src/test/ui/deprecation/deprecation-lint-2.stderr +++ b/src/test/ui/deprecation/deprecation-lint-2.stderr @@ -9,7 +9,7 @@ note: the lint level is defined here | LL | #![deny(deprecated)] | ^^^^^^^^^^ - = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z macro-backtrace for more info) + = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) error: aborting due to previous error diff --git a/src/test/ui/deprecation/deprecation-lint-3.stderr b/src/test/ui/deprecation/deprecation-lint-3.stderr index f675b6af958f5..b450f74d7f367 100644 --- a/src/test/ui/deprecation/deprecation-lint-3.stderr +++ b/src/test/ui/deprecation/deprecation-lint-3.stderr @@ -9,7 +9,7 @@ note: the lint level is defined here | LL | #![deny(deprecated)] | ^^^^^^^^^^ - = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z macro-backtrace for more info) + = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) error: aborting due to previous error diff --git a/src/test/ui/deref-suggestion.stderr b/src/test/ui/deref-suggestion.stderr index f4843469ccefc..89fd7aae3bea0 100644 --- a/src/test/ui/deref-suggestion.stderr +++ b/src/test/ui/deref-suggestion.stderr @@ -42,6 +42,8 @@ LL | ($x:expr) => { &$x } ... LL | foo3(borrow!(0)); | ---------- in this macro invocation + | + = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) error[E0308]: mismatched types --> $DIR/deref-suggestion.rs:36:5 @@ -49,7 +51,7 @@ error[E0308]: mismatched types LL | assert_eq!(3i32, &3i32); | ^^^^^^^^^^^^^^^^^^^^^^^^ expected `i32`, found `&i32` | - = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z macro-backtrace for more info) + = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) error[E0308]: mismatched types --> $DIR/deref-suggestion.rs:39:17 diff --git a/src/test/ui/derives/derives-span-Clone-enum-struct-variant.stderr b/src/test/ui/derives/derives-span-Clone-enum-struct-variant.stderr index 5ddc5b5708c18..8ef2d3d30238f 100644 --- a/src/test/ui/derives/derives-span-Clone-enum-struct-variant.stderr +++ b/src/test/ui/derives/derives-span-Clone-enum-struct-variant.stderr @@ -5,6 +5,7 @@ LL | x: Error | ^^^^^^^^ the trait `std::clone::Clone` is not implemented for `Error` | = note: required by `std::clone::Clone::clone` + = note: this error originates in a derive macro (in Nightly builds, run with -Z macro-backtrace for more info) error: aborting due to previous error diff --git a/src/test/ui/derives/derives-span-Clone-enum.stderr b/src/test/ui/derives/derives-span-Clone-enum.stderr index 80ef9238f4775..8c740733e2fa4 100644 --- a/src/test/ui/derives/derives-span-Clone-enum.stderr +++ b/src/test/ui/derives/derives-span-Clone-enum.stderr @@ -5,6 +5,7 @@ LL | Error | ^^^^^ the trait `std::clone::Clone` is not implemented for `Error` | = note: required by `std::clone::Clone::clone` + = note: this error originates in a derive macro (in Nightly builds, run with -Z macro-backtrace for more info) error: aborting due to previous error diff --git a/src/test/ui/derives/derives-span-Clone-struct.stderr b/src/test/ui/derives/derives-span-Clone-struct.stderr index 17f3925107b8a..75a59fbf035d4 100644 --- a/src/test/ui/derives/derives-span-Clone-struct.stderr +++ b/src/test/ui/derives/derives-span-Clone-struct.stderr @@ -5,6 +5,7 @@ LL | x: Error | ^^^^^^^^ the trait `std::clone::Clone` is not implemented for `Error` | = note: required by `std::clone::Clone::clone` + = note: this error originates in a derive macro (in Nightly builds, run with -Z macro-backtrace for more info) error: aborting due to previous error diff --git a/src/test/ui/derives/derives-span-Clone-tuple-struct.stderr b/src/test/ui/derives/derives-span-Clone-tuple-struct.stderr index e98212f361871..1860c5f2ff6ac 100644 --- a/src/test/ui/derives/derives-span-Clone-tuple-struct.stderr +++ b/src/test/ui/derives/derives-span-Clone-tuple-struct.stderr @@ -5,6 +5,7 @@ LL | Error | ^^^^^ the trait `std::clone::Clone` is not implemented for `Error` | = note: required by `std::clone::Clone::clone` + = note: this error originates in a derive macro (in Nightly builds, run with -Z macro-backtrace for more info) error: aborting due to previous error diff --git a/src/test/ui/derives/derives-span-Debug-enum-struct-variant.stderr b/src/test/ui/derives/derives-span-Debug-enum-struct-variant.stderr index 233c4c5498320..ab3c5ef3c1d81 100644 --- a/src/test/ui/derives/derives-span-Debug-enum-struct-variant.stderr +++ b/src/test/ui/derives/derives-span-Debug-enum-struct-variant.stderr @@ -8,6 +8,7 @@ LL | x: Error = note: add `#[derive(Debug)]` or manually implement `std::fmt::Debug` = note: required because of the requirements on the impl of `std::fmt::Debug` for `&Error` = note: required for the cast to the object type `dyn std::fmt::Debug` + = note: this error originates in a derive macro (in Nightly builds, run with -Z macro-backtrace for more info) error: aborting due to previous error diff --git a/src/test/ui/derives/derives-span-Debug-enum.stderr b/src/test/ui/derives/derives-span-Debug-enum.stderr index fbda3980cfc77..e0a76d5251594 100644 --- a/src/test/ui/derives/derives-span-Debug-enum.stderr +++ b/src/test/ui/derives/derives-span-Debug-enum.stderr @@ -8,6 +8,7 @@ LL | Error = note: add `#[derive(Debug)]` or manually implement `std::fmt::Debug` = note: required because of the requirements on the impl of `std::fmt::Debug` for `&Error` = note: required for the cast to the object type `dyn std::fmt::Debug` + = note: this error originates in a derive macro (in Nightly builds, run with -Z macro-backtrace for more info) error: aborting due to previous error diff --git a/src/test/ui/derives/derives-span-Debug-struct.stderr b/src/test/ui/derives/derives-span-Debug-struct.stderr index b56d223b34bc4..2f5cba09e4c2a 100644 --- a/src/test/ui/derives/derives-span-Debug-struct.stderr +++ b/src/test/ui/derives/derives-span-Debug-struct.stderr @@ -8,6 +8,7 @@ LL | x: Error = note: add `#[derive(Debug)]` or manually implement `std::fmt::Debug` = note: required because of the requirements on the impl of `std::fmt::Debug` for `&Error` = note: required for the cast to the object type `dyn std::fmt::Debug` + = note: this error originates in a derive macro (in Nightly builds, run with -Z macro-backtrace for more info) error: aborting due to previous error diff --git a/src/test/ui/derives/derives-span-Debug-tuple-struct.stderr b/src/test/ui/derives/derives-span-Debug-tuple-struct.stderr index 76dd6e31e604c..58ec131d54155 100644 --- a/src/test/ui/derives/derives-span-Debug-tuple-struct.stderr +++ b/src/test/ui/derives/derives-span-Debug-tuple-struct.stderr @@ -8,6 +8,7 @@ LL | Error = note: add `#[derive(Debug)]` or manually implement `std::fmt::Debug` = note: required because of the requirements on the impl of `std::fmt::Debug` for `&Error` = note: required for the cast to the object type `dyn std::fmt::Debug` + = note: this error originates in a derive macro (in Nightly builds, run with -Z macro-backtrace for more info) error: aborting due to previous error diff --git a/src/test/ui/derives/derives-span-Default-struct.stderr b/src/test/ui/derives/derives-span-Default-struct.stderr index 784be7fede368..b97dda719ab78 100644 --- a/src/test/ui/derives/derives-span-Default-struct.stderr +++ b/src/test/ui/derives/derives-span-Default-struct.stderr @@ -5,6 +5,7 @@ LL | x: Error | ^^^^^^^^ the trait `std::default::Default` is not implemented for `Error` | = note: required by `std::default::Default::default` + = note: this error originates in a derive macro (in Nightly builds, run with -Z macro-backtrace for more info) error: aborting due to previous error diff --git a/src/test/ui/derives/derives-span-Default-tuple-struct.stderr b/src/test/ui/derives/derives-span-Default-tuple-struct.stderr index a93fa058f8dff..d976891f41fea 100644 --- a/src/test/ui/derives/derives-span-Default-tuple-struct.stderr +++ b/src/test/ui/derives/derives-span-Default-tuple-struct.stderr @@ -5,6 +5,7 @@ LL | Error | ^^^^^ the trait `std::default::Default` is not implemented for `Error` | = note: required by `std::default::Default::default` + = note: this error originates in a derive macro (in Nightly builds, run with -Z macro-backtrace for more info) error: aborting due to previous error diff --git a/src/test/ui/derives/derives-span-Eq-enum-struct-variant.stderr b/src/test/ui/derives/derives-span-Eq-enum-struct-variant.stderr index bad0ce31f7075..f886c29c4db9a 100644 --- a/src/test/ui/derives/derives-span-Eq-enum-struct-variant.stderr +++ b/src/test/ui/derives/derives-span-Eq-enum-struct-variant.stderr @@ -5,6 +5,7 @@ LL | x: Error | ^^^^^^^^ the trait `std::cmp::Eq` is not implemented for `Error` | = note: required by `std::cmp::AssertParamIsEq` + = note: this error originates in a derive macro (in Nightly builds, run with -Z macro-backtrace for more info) error: aborting due to previous error diff --git a/src/test/ui/derives/derives-span-Eq-enum.stderr b/src/test/ui/derives/derives-span-Eq-enum.stderr index a7cc19d4c0f44..0b5470138a5b3 100644 --- a/src/test/ui/derives/derives-span-Eq-enum.stderr +++ b/src/test/ui/derives/derives-span-Eq-enum.stderr @@ -5,6 +5,7 @@ LL | Error | ^^^^^ the trait `std::cmp::Eq` is not implemented for `Error` | = note: required by `std::cmp::AssertParamIsEq` + = note: this error originates in a derive macro (in Nightly builds, run with -Z macro-backtrace for more info) error: aborting due to previous error diff --git a/src/test/ui/derives/derives-span-Eq-struct.stderr b/src/test/ui/derives/derives-span-Eq-struct.stderr index 10631cb12bff3..76904d6723587 100644 --- a/src/test/ui/derives/derives-span-Eq-struct.stderr +++ b/src/test/ui/derives/derives-span-Eq-struct.stderr @@ -5,6 +5,7 @@ LL | x: Error | ^^^^^^^^ the trait `std::cmp::Eq` is not implemented for `Error` | = note: required by `std::cmp::AssertParamIsEq` + = note: this error originates in a derive macro (in Nightly builds, run with -Z macro-backtrace for more info) error: aborting due to previous error diff --git a/src/test/ui/derives/derives-span-Eq-tuple-struct.stderr b/src/test/ui/derives/derives-span-Eq-tuple-struct.stderr index 117ed62cf7ae0..ff94b989d26d5 100644 --- a/src/test/ui/derives/derives-span-Eq-tuple-struct.stderr +++ b/src/test/ui/derives/derives-span-Eq-tuple-struct.stderr @@ -5,6 +5,7 @@ LL | Error | ^^^^^ the trait `std::cmp::Eq` is not implemented for `Error` | = note: required by `std::cmp::AssertParamIsEq` + = note: this error originates in a derive macro (in Nightly builds, run with -Z macro-backtrace for more info) error: aborting due to previous error diff --git a/src/test/ui/derives/derives-span-Hash-enum-struct-variant.stderr b/src/test/ui/derives/derives-span-Hash-enum-struct-variant.stderr index 00b033004ec8f..889c725c843e7 100644 --- a/src/test/ui/derives/derives-span-Hash-enum-struct-variant.stderr +++ b/src/test/ui/derives/derives-span-Hash-enum-struct-variant.stderr @@ -8,6 +8,8 @@ LL | x: Error | LL | fn hash(&self, state: &mut H); | - required by this bound in `std::hash::Hash::hash` + | + = note: this error originates in a derive macro (in Nightly builds, run with -Z macro-backtrace for more info) error: aborting due to previous error diff --git a/src/test/ui/derives/derives-span-Hash-enum.stderr b/src/test/ui/derives/derives-span-Hash-enum.stderr index 004cabf207ab9..70b8a85d107f1 100644 --- a/src/test/ui/derives/derives-span-Hash-enum.stderr +++ b/src/test/ui/derives/derives-span-Hash-enum.stderr @@ -8,6 +8,8 @@ LL | Error | LL | fn hash(&self, state: &mut H); | - required by this bound in `std::hash::Hash::hash` + | + = note: this error originates in a derive macro (in Nightly builds, run with -Z macro-backtrace for more info) error: aborting due to previous error diff --git a/src/test/ui/derives/derives-span-Hash-struct.stderr b/src/test/ui/derives/derives-span-Hash-struct.stderr index 27b8ff3d11469..61897392a726a 100644 --- a/src/test/ui/derives/derives-span-Hash-struct.stderr +++ b/src/test/ui/derives/derives-span-Hash-struct.stderr @@ -8,6 +8,8 @@ LL | x: Error | LL | fn hash(&self, state: &mut H); | - required by this bound in `std::hash::Hash::hash` + | + = note: this error originates in a derive macro (in Nightly builds, run with -Z macro-backtrace for more info) error: aborting due to previous error diff --git a/src/test/ui/derives/derives-span-Hash-tuple-struct.stderr b/src/test/ui/derives/derives-span-Hash-tuple-struct.stderr index f1142bc50332a..fb929ad985b5f 100644 --- a/src/test/ui/derives/derives-span-Hash-tuple-struct.stderr +++ b/src/test/ui/derives/derives-span-Hash-tuple-struct.stderr @@ -8,6 +8,8 @@ LL | Error | LL | fn hash(&self, state: &mut H); | - required by this bound in `std::hash::Hash::hash` + | + = note: this error originates in a derive macro (in Nightly builds, run with -Z macro-backtrace for more info) error: aborting due to previous error diff --git a/src/test/ui/derives/derives-span-Ord-enum-struct-variant.stderr b/src/test/ui/derives/derives-span-Ord-enum-struct-variant.stderr index 1d9d1332b57b8..7e73392fd51d5 100644 --- a/src/test/ui/derives/derives-span-Ord-enum-struct-variant.stderr +++ b/src/test/ui/derives/derives-span-Ord-enum-struct-variant.stderr @@ -5,6 +5,7 @@ LL | x: Error | ^^^^^^^^ the trait `std::cmp::Ord` is not implemented for `Error` | = note: required by `std::cmp::Ord::cmp` + = note: this error originates in a derive macro (in Nightly builds, run with -Z macro-backtrace for more info) error: aborting due to previous error diff --git a/src/test/ui/derives/derives-span-Ord-enum.stderr b/src/test/ui/derives/derives-span-Ord-enum.stderr index acc8b0c69483e..68df309e0462f 100644 --- a/src/test/ui/derives/derives-span-Ord-enum.stderr +++ b/src/test/ui/derives/derives-span-Ord-enum.stderr @@ -5,6 +5,7 @@ LL | Error | ^^^^^ the trait `std::cmp::Ord` is not implemented for `Error` | = note: required by `std::cmp::Ord::cmp` + = note: this error originates in a derive macro (in Nightly builds, run with -Z macro-backtrace for more info) error: aborting due to previous error diff --git a/src/test/ui/derives/derives-span-Ord-struct.stderr b/src/test/ui/derives/derives-span-Ord-struct.stderr index e4dcf29545f12..5e1ed33509406 100644 --- a/src/test/ui/derives/derives-span-Ord-struct.stderr +++ b/src/test/ui/derives/derives-span-Ord-struct.stderr @@ -5,6 +5,7 @@ LL | x: Error | ^^^^^^^^ the trait `std::cmp::Ord` is not implemented for `Error` | = note: required by `std::cmp::Ord::cmp` + = note: this error originates in a derive macro (in Nightly builds, run with -Z macro-backtrace for more info) error: aborting due to previous error diff --git a/src/test/ui/derives/derives-span-Ord-tuple-struct.stderr b/src/test/ui/derives/derives-span-Ord-tuple-struct.stderr index c21dfc26cb0d3..d9692e56431ef 100644 --- a/src/test/ui/derives/derives-span-Ord-tuple-struct.stderr +++ b/src/test/ui/derives/derives-span-Ord-tuple-struct.stderr @@ -5,6 +5,7 @@ LL | Error | ^^^^^ the trait `std::cmp::Ord` is not implemented for `Error` | = note: required by `std::cmp::Ord::cmp` + = note: this error originates in a derive macro (in Nightly builds, run with -Z macro-backtrace for more info) error: aborting due to previous error diff --git a/src/test/ui/derives/derives-span-PartialEq-enum-struct-variant.stderr b/src/test/ui/derives/derives-span-PartialEq-enum-struct-variant.stderr index eb4b1c84a601d..c669636c85043 100644 --- a/src/test/ui/derives/derives-span-PartialEq-enum-struct-variant.stderr +++ b/src/test/ui/derives/derives-span-PartialEq-enum-struct-variant.stderr @@ -5,6 +5,7 @@ LL | x: Error | ^^^^^^^^ | = note: an implementation of `std::cmp::PartialEq` might be missing for `Error` + = note: this error originates in a derive macro (in Nightly builds, run with -Z macro-backtrace for more info) error[E0369]: binary operation `!=` cannot be applied to type `Error` --> $DIR/derives-span-PartialEq-enum-struct-variant.rs:13:6 @@ -13,6 +14,7 @@ LL | x: Error | ^^^^^^^^ | = note: an implementation of `std::cmp::PartialEq` might be missing for `Error` + = note: this error originates in a derive macro (in Nightly builds, run with -Z macro-backtrace for more info) error: aborting due to 2 previous errors diff --git a/src/test/ui/derives/derives-span-PartialEq-enum.stderr b/src/test/ui/derives/derives-span-PartialEq-enum.stderr index b63e374d89bf1..ff98edea4dcff 100644 --- a/src/test/ui/derives/derives-span-PartialEq-enum.stderr +++ b/src/test/ui/derives/derives-span-PartialEq-enum.stderr @@ -5,6 +5,7 @@ LL | Error | ^^^^^ | = note: an implementation of `std::cmp::PartialEq` might be missing for `Error` + = note: this error originates in a derive macro (in Nightly builds, run with -Z macro-backtrace for more info) error[E0369]: binary operation `!=` cannot be applied to type `Error` --> $DIR/derives-span-PartialEq-enum.rs:13:6 @@ -13,6 +14,7 @@ LL | Error | ^^^^^ | = note: an implementation of `std::cmp::PartialEq` might be missing for `Error` + = note: this error originates in a derive macro (in Nightly builds, run with -Z macro-backtrace for more info) error: aborting due to 2 previous errors diff --git a/src/test/ui/derives/derives-span-PartialEq-struct.stderr b/src/test/ui/derives/derives-span-PartialEq-struct.stderr index a147f409639a8..200b8e2d503c8 100644 --- a/src/test/ui/derives/derives-span-PartialEq-struct.stderr +++ b/src/test/ui/derives/derives-span-PartialEq-struct.stderr @@ -5,6 +5,7 @@ LL | x: Error | ^^^^^^^^ | = note: an implementation of `std::cmp::PartialEq` might be missing for `Error` + = note: this error originates in a derive macro (in Nightly builds, run with -Z macro-backtrace for more info) error[E0369]: binary operation `!=` cannot be applied to type `Error` --> $DIR/derives-span-PartialEq-struct.rs:12:5 @@ -13,6 +14,7 @@ LL | x: Error | ^^^^^^^^ | = note: an implementation of `std::cmp::PartialEq` might be missing for `Error` + = note: this error originates in a derive macro (in Nightly builds, run with -Z macro-backtrace for more info) error: aborting due to 2 previous errors diff --git a/src/test/ui/derives/derives-span-PartialEq-tuple-struct.stderr b/src/test/ui/derives/derives-span-PartialEq-tuple-struct.stderr index fefbf5f9ec9d1..9e3d1309c2258 100644 --- a/src/test/ui/derives/derives-span-PartialEq-tuple-struct.stderr +++ b/src/test/ui/derives/derives-span-PartialEq-tuple-struct.stderr @@ -5,6 +5,7 @@ LL | Error | ^^^^^ | = note: an implementation of `std::cmp::PartialEq` might be missing for `Error` + = note: this error originates in a derive macro (in Nightly builds, run with -Z macro-backtrace for more info) error[E0369]: binary operation `!=` cannot be applied to type `Error` --> $DIR/derives-span-PartialEq-tuple-struct.rs:12:5 @@ -13,6 +14,7 @@ LL | Error | ^^^^^ | = note: an implementation of `std::cmp::PartialEq` might be missing for `Error` + = note: this error originates in a derive macro (in Nightly builds, run with -Z macro-backtrace for more info) error: aborting due to 2 previous errors diff --git a/src/test/ui/derives/derives-span-PartialOrd-enum-struct-variant.stderr b/src/test/ui/derives/derives-span-PartialOrd-enum-struct-variant.stderr index 80b896f4f043e..6433d1f5e27a5 100644 --- a/src/test/ui/derives/derives-span-PartialOrd-enum-struct-variant.stderr +++ b/src/test/ui/derives/derives-span-PartialOrd-enum-struct-variant.stderr @@ -6,6 +6,7 @@ LL | x: Error | = help: the trait `std::cmp::PartialOrd` is not implemented for `Error` = note: required by `std::cmp::PartialOrd::partial_cmp` + = note: this error originates in a derive macro (in Nightly builds, run with -Z macro-backtrace for more info) error[E0277]: can't compare `Error` with `Error` --> $DIR/derives-span-PartialOrd-enum-struct-variant.rs:13:6 @@ -15,6 +16,7 @@ LL | x: Error | = help: the trait `std::cmp::PartialOrd` is not implemented for `Error` = note: required by `std::cmp::PartialOrd::partial_cmp` + = note: this error originates in a derive macro (in Nightly builds, run with -Z macro-backtrace for more info) error[E0277]: can't compare `Error` with `Error` --> $DIR/derives-span-PartialOrd-enum-struct-variant.rs:13:6 @@ -24,6 +26,7 @@ LL | x: Error | = help: the trait `std::cmp::PartialOrd` is not implemented for `Error` = note: required by `std::cmp::PartialOrd::partial_cmp` + = note: this error originates in a derive macro (in Nightly builds, run with -Z macro-backtrace for more info) error[E0277]: can't compare `Error` with `Error` --> $DIR/derives-span-PartialOrd-enum-struct-variant.rs:13:6 @@ -33,6 +36,7 @@ LL | x: Error | = help: the trait `std::cmp::PartialOrd` is not implemented for `Error` = note: required by `std::cmp::PartialOrd::partial_cmp` + = note: this error originates in a derive macro (in Nightly builds, run with -Z macro-backtrace for more info) error[E0277]: can't compare `Error` with `Error` --> $DIR/derives-span-PartialOrd-enum-struct-variant.rs:13:6 @@ -42,6 +46,7 @@ LL | x: Error | = help: the trait `std::cmp::PartialOrd` is not implemented for `Error` = note: required by `std::cmp::PartialOrd::partial_cmp` + = note: this error originates in a derive macro (in Nightly builds, run with -Z macro-backtrace for more info) error: aborting due to 5 previous errors diff --git a/src/test/ui/derives/derives-span-PartialOrd-enum.stderr b/src/test/ui/derives/derives-span-PartialOrd-enum.stderr index f12038fb867a7..b1be7dd05f984 100644 --- a/src/test/ui/derives/derives-span-PartialOrd-enum.stderr +++ b/src/test/ui/derives/derives-span-PartialOrd-enum.stderr @@ -6,6 +6,7 @@ LL | Error | = help: the trait `std::cmp::PartialOrd` is not implemented for `Error` = note: required by `std::cmp::PartialOrd::partial_cmp` + = note: this error originates in a derive macro (in Nightly builds, run with -Z macro-backtrace for more info) error[E0277]: can't compare `Error` with `Error` --> $DIR/derives-span-PartialOrd-enum.rs:13:6 @@ -15,6 +16,7 @@ LL | Error | = help: the trait `std::cmp::PartialOrd` is not implemented for `Error` = note: required by `std::cmp::PartialOrd::partial_cmp` + = note: this error originates in a derive macro (in Nightly builds, run with -Z macro-backtrace for more info) error[E0277]: can't compare `Error` with `Error` --> $DIR/derives-span-PartialOrd-enum.rs:13:6 @@ -24,6 +26,7 @@ LL | Error | = help: the trait `std::cmp::PartialOrd` is not implemented for `Error` = note: required by `std::cmp::PartialOrd::partial_cmp` + = note: this error originates in a derive macro (in Nightly builds, run with -Z macro-backtrace for more info) error[E0277]: can't compare `Error` with `Error` --> $DIR/derives-span-PartialOrd-enum.rs:13:6 @@ -33,6 +36,7 @@ LL | Error | = help: the trait `std::cmp::PartialOrd` is not implemented for `Error` = note: required by `std::cmp::PartialOrd::partial_cmp` + = note: this error originates in a derive macro (in Nightly builds, run with -Z macro-backtrace for more info) error[E0277]: can't compare `Error` with `Error` --> $DIR/derives-span-PartialOrd-enum.rs:13:6 @@ -42,6 +46,7 @@ LL | Error | = help: the trait `std::cmp::PartialOrd` is not implemented for `Error` = note: required by `std::cmp::PartialOrd::partial_cmp` + = note: this error originates in a derive macro (in Nightly builds, run with -Z macro-backtrace for more info) error: aborting due to 5 previous errors diff --git a/src/test/ui/derives/derives-span-PartialOrd-struct.stderr b/src/test/ui/derives/derives-span-PartialOrd-struct.stderr index dbb014752ec01..064c91fd7ddc3 100644 --- a/src/test/ui/derives/derives-span-PartialOrd-struct.stderr +++ b/src/test/ui/derives/derives-span-PartialOrd-struct.stderr @@ -6,6 +6,7 @@ LL | x: Error | = help: the trait `std::cmp::PartialOrd` is not implemented for `Error` = note: required by `std::cmp::PartialOrd::partial_cmp` + = note: this error originates in a derive macro (in Nightly builds, run with -Z macro-backtrace for more info) error[E0277]: can't compare `Error` with `Error` --> $DIR/derives-span-PartialOrd-struct.rs:12:5 @@ -15,6 +16,7 @@ LL | x: Error | = help: the trait `std::cmp::PartialOrd` is not implemented for `Error` = note: required by `std::cmp::PartialOrd::partial_cmp` + = note: this error originates in a derive macro (in Nightly builds, run with -Z macro-backtrace for more info) error[E0277]: can't compare `Error` with `Error` --> $DIR/derives-span-PartialOrd-struct.rs:12:5 @@ -24,6 +26,7 @@ LL | x: Error | = help: the trait `std::cmp::PartialOrd` is not implemented for `Error` = note: required by `std::cmp::PartialOrd::partial_cmp` + = note: this error originates in a derive macro (in Nightly builds, run with -Z macro-backtrace for more info) error[E0277]: can't compare `Error` with `Error` --> $DIR/derives-span-PartialOrd-struct.rs:12:5 @@ -33,6 +36,7 @@ LL | x: Error | = help: the trait `std::cmp::PartialOrd` is not implemented for `Error` = note: required by `std::cmp::PartialOrd::partial_cmp` + = note: this error originates in a derive macro (in Nightly builds, run with -Z macro-backtrace for more info) error[E0277]: can't compare `Error` with `Error` --> $DIR/derives-span-PartialOrd-struct.rs:12:5 @@ -42,6 +46,7 @@ LL | x: Error | = help: the trait `std::cmp::PartialOrd` is not implemented for `Error` = note: required by `std::cmp::PartialOrd::partial_cmp` + = note: this error originates in a derive macro (in Nightly builds, run with -Z macro-backtrace for more info) error: aborting due to 5 previous errors diff --git a/src/test/ui/derives/derives-span-PartialOrd-tuple-struct.stderr b/src/test/ui/derives/derives-span-PartialOrd-tuple-struct.stderr index f6f1694bbf01e..5b627022cca46 100644 --- a/src/test/ui/derives/derives-span-PartialOrd-tuple-struct.stderr +++ b/src/test/ui/derives/derives-span-PartialOrd-tuple-struct.stderr @@ -6,6 +6,7 @@ LL | Error | = help: the trait `std::cmp::PartialOrd` is not implemented for `Error` = note: required by `std::cmp::PartialOrd::partial_cmp` + = note: this error originates in a derive macro (in Nightly builds, run with -Z macro-backtrace for more info) error[E0277]: can't compare `Error` with `Error` --> $DIR/derives-span-PartialOrd-tuple-struct.rs:12:5 @@ -15,6 +16,7 @@ LL | Error | = help: the trait `std::cmp::PartialOrd` is not implemented for `Error` = note: required by `std::cmp::PartialOrd::partial_cmp` + = note: this error originates in a derive macro (in Nightly builds, run with -Z macro-backtrace for more info) error[E0277]: can't compare `Error` with `Error` --> $DIR/derives-span-PartialOrd-tuple-struct.rs:12:5 @@ -24,6 +26,7 @@ LL | Error | = help: the trait `std::cmp::PartialOrd` is not implemented for `Error` = note: required by `std::cmp::PartialOrd::partial_cmp` + = note: this error originates in a derive macro (in Nightly builds, run with -Z macro-backtrace for more info) error[E0277]: can't compare `Error` with `Error` --> $DIR/derives-span-PartialOrd-tuple-struct.rs:12:5 @@ -33,6 +36,7 @@ LL | Error | = help: the trait `std::cmp::PartialOrd` is not implemented for `Error` = note: required by `std::cmp::PartialOrd::partial_cmp` + = note: this error originates in a derive macro (in Nightly builds, run with -Z macro-backtrace for more info) error[E0277]: can't compare `Error` with `Error` --> $DIR/derives-span-PartialOrd-tuple-struct.rs:12:5 @@ -42,6 +46,7 @@ LL | Error | = help: the trait `std::cmp::PartialOrd` is not implemented for `Error` = note: required by `std::cmp::PartialOrd::partial_cmp` + = note: this error originates in a derive macro (in Nightly builds, run with -Z macro-backtrace for more info) error: aborting due to 5 previous errors diff --git a/src/test/ui/derives/deriving-no-inner-impl-error-message.stderr b/src/test/ui/derives/deriving-no-inner-impl-error-message.stderr index 3b480f00df6ea..d4995c1d50c73 100644 --- a/src/test/ui/derives/deriving-no-inner-impl-error-message.stderr +++ b/src/test/ui/derives/deriving-no-inner-impl-error-message.stderr @@ -5,6 +5,7 @@ LL | x: NoCloneOrEq | ^^^^^^^^^^^^^^ | = note: an implementation of `std::cmp::PartialEq` might be missing for `NoCloneOrEq` + = note: this error originates in a derive macro (in Nightly builds, run with -Z macro-backtrace for more info) error[E0369]: binary operation `!=` cannot be applied to type `NoCloneOrEq` --> $DIR/deriving-no-inner-impl-error-message.rs:5:5 @@ -13,6 +14,7 @@ LL | x: NoCloneOrEq | ^^^^^^^^^^^^^^ | = note: an implementation of `std::cmp::PartialEq` might be missing for `NoCloneOrEq` + = note: this error originates in a derive macro (in Nightly builds, run with -Z macro-backtrace for more info) error[E0277]: the trait bound `NoCloneOrEq: std::clone::Clone` is not satisfied --> $DIR/deriving-no-inner-impl-error-message.rs:10:5 @@ -21,6 +23,7 @@ LL | x: NoCloneOrEq | ^^^^^^^^^^^^^^ the trait `std::clone::Clone` is not implemented for `NoCloneOrEq` | = note: required by `std::clone::Clone::clone` + = note: this error originates in a derive macro (in Nightly builds, run with -Z macro-backtrace for more info) error: aborting due to 3 previous errors diff --git a/src/test/ui/derives/deriving-with-repr-packed.stderr b/src/test/ui/derives/deriving-with-repr-packed.stderr index 8ab2e4cba7493..d739257c8de63 100644 --- a/src/test/ui/derives/deriving-with-repr-packed.stderr +++ b/src/test/ui/derives/deriving-with-repr-packed.stderr @@ -11,6 +11,7 @@ LL | #![deny(safe_packed_borrows)] | ^^^^^^^^^^^^^^^^^^^ = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! = note: for more information, see issue #46043 + = note: this error originates in a derive macro (in Nightly builds, run with -Z macro-backtrace for more info) error: `#[derive]` can't be used on a `#[repr(packed)]` struct with type or const parameters (error E0133) --> $DIR/deriving-with-repr-packed.rs:8:23 @@ -20,6 +21,7 @@ LL | #[derive(Copy, Clone, PartialEq, Eq)] | = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! = note: for more information, see issue #46043 + = note: this error originates in a derive macro (in Nightly builds, run with -Z macro-backtrace for more info) error: `#[derive]` can't be used on a `#[repr(packed)]` struct that does not derive Copy (error E0133) --> $DIR/deriving-with-repr-packed.rs:16:10 @@ -29,6 +31,7 @@ LL | #[derive(PartialEq, Eq)] | = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! = note: for more information, see issue #46043 + = note: this error originates in a derive macro (in Nightly builds, run with -Z macro-backtrace for more info) error: `#[derive]` can't be used on a `#[repr(packed)]` struct that does not derive Copy (error E0133) --> $DIR/deriving-with-repr-packed.rs:25:10 @@ -38,6 +41,7 @@ LL | #[derive(PartialEq)] | = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! = note: for more information, see issue #46043 + = note: this error originates in a derive macro (in Nightly builds, run with -Z macro-backtrace for more info) error: aborting due to 4 previous errors diff --git a/src/test/ui/did_you_mean/bad-assoc-expr.stderr b/src/test/ui/did_you_mean/bad-assoc-expr.stderr index 2024564b911f6..fe3fb43730a8c 100644 --- a/src/test/ui/did_you_mean/bad-assoc-expr.stderr +++ b/src/test/ui/did_you_mean/bad-assoc-expr.stderr @@ -54,6 +54,8 @@ LL | ($ty: ty) => ($ty::clone(&0)) ... LL | expr!(u8); | ---------- in this macro invocation + | + = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) error: aborting due to 9 previous errors diff --git a/src/test/ui/did_you_mean/bad-assoc-pat.stderr b/src/test/ui/did_you_mean/bad-assoc-pat.stderr index 3f1946b94f64b..924a5d756436d 100644 --- a/src/test/ui/did_you_mean/bad-assoc-pat.stderr +++ b/src/test/ui/did_you_mean/bad-assoc-pat.stderr @@ -36,6 +36,8 @@ LL | ($ty: ty) => ($ty::AssocItem) ... LL | pat!(u8) => {} | -------- in this macro invocation + | + = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) error[E0599]: no associated item named `AssocItem` found for slice `[u8]` in the current scope --> $DIR/bad-assoc-pat.rs:3:15 @@ -69,6 +71,8 @@ LL | ($ty: ty) => ($ty::AssocItem) ... LL | pat!(u8) => {} | -------- in this macro invocation + | + = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) error[E0599]: no associated item named `AssocItem` found for type `u8` in the current scope --> $DIR/bad-assoc-pat.rs:32:16 diff --git a/src/test/ui/did_you_mean/bad-assoc-ty.stderr b/src/test/ui/did_you_mean/bad-assoc-ty.stderr index 7d3c99bda6b6a..64e49934d8762 100644 --- a/src/test/ui/did_you_mean/bad-assoc-ty.stderr +++ b/src/test/ui/did_you_mean/bad-assoc-ty.stderr @@ -54,6 +54,8 @@ LL | ($ty: ty) => ($ty::AssocTy); ... LL | type J = ty!(u8); | ------- in this macro invocation + | + = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) error[E0223]: ambiguous associated type --> $DIR/bad-assoc-ty.rs:1:10 @@ -111,6 +113,8 @@ LL | ($ty: ty) => ($ty::AssocTy); ... LL | type J = ty!(u8); | ------- in this macro invocation + | + = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) error[E0223]: ambiguous associated type --> $DIR/bad-assoc-ty.rs:44:10 diff --git a/src/test/ui/did_you_mean/recursion_limit_macro.stderr b/src/test/ui/did_you_mean/recursion_limit_macro.stderr index 18d321c24d80c..4935c698f2056 100644 --- a/src/test/ui/did_you_mean/recursion_limit_macro.stderr +++ b/src/test/ui/did_you_mean/recursion_limit_macro.stderr @@ -8,6 +8,7 @@ LL | recurse!(0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9); | -------------------------------------------------- in this macro invocation | = help: consider adding a `#![recursion_limit="20"]` attribute to your crate (`recursion_limit_macro`) + = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) error: aborting due to previous error diff --git a/src/test/ui/dollar-crate/dollar-crate-is-keyword-2.stderr b/src/test/ui/dollar-crate/dollar-crate-is-keyword-2.stderr index 55261a5e6aead..2aad57dee7daa 100644 --- a/src/test/ui/dollar-crate/dollar-crate-is-keyword-2.stderr +++ b/src/test/ui/dollar-crate/dollar-crate-is-keyword-2.stderr @@ -6,6 +6,8 @@ LL | use a::$crate::b; ... LL | m!(); | ----- in this macro invocation + | + = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) error[E0432]: unresolved import `a::$crate` --> $DIR/dollar-crate-is-keyword-2.rs:5:13 @@ -15,6 +17,8 @@ LL | use a::$crate; ... LL | m!(); | ----- in this macro invocation + | + = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) error[E0433]: failed to resolve: `$crate` in paths can only be used in start position --> $DIR/dollar-crate-is-keyword-2.rs:7:21 @@ -24,6 +28,8 @@ LL | type A = a::$crate; ... LL | m!(); | ----- in this macro invocation + | + = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) error: aborting due to 3 previous errors diff --git a/src/test/ui/dollar-crate/dollar-crate-is-keyword.stderr b/src/test/ui/dollar-crate/dollar-crate-is-keyword.stderr index f5a5f13f9121e..d424bd2f2858c 100644 --- a/src/test/ui/dollar-crate/dollar-crate-is-keyword.stderr +++ b/src/test/ui/dollar-crate/dollar-crate-is-keyword.stderr @@ -6,6 +6,8 @@ LL | struct $crate {} ... LL | m!(); | ----- in this macro invocation + | + = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) error: expected identifier, found reserved identifier `$crate` --> $DIR/dollar-crate-is-keyword.rs:10:23 @@ -15,6 +17,8 @@ LL | use $crate as $crate; ... LL | m!(); | ----- in this macro invocation + | + = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) error: `$crate` may not be imported --> $DIR/dollar-crate-is-keyword.rs:9:9 @@ -24,6 +28,8 @@ LL | use $crate; ... LL | m!(); | ----- in this macro invocation + | + = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) error: `$crate` may not be imported --> $DIR/dollar-crate-is-keyword.rs:10:9 @@ -33,6 +39,8 @@ LL | use $crate as $crate; ... LL | m!(); | ----- in this macro invocation + | + = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) error: aborting due to 4 previous errors diff --git a/src/test/ui/editions/edition-imports-2015.stderr b/src/test/ui/editions/edition-imports-2015.stderr index 4b7be3cf98dfe..ec8b88ecba22b 100644 --- a/src/test/ui/editions/edition-imports-2015.stderr +++ b/src/test/ui/editions/edition-imports-2015.stderr @@ -4,7 +4,7 @@ error: cannot glob-import all possible crates LL | gen_glob!(); | ^^^^^^^^^^^^ | - = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z macro-backtrace for more info) + = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) error: aborting due to previous error diff --git a/src/test/ui/editions/edition-imports-2018.stderr b/src/test/ui/editions/edition-imports-2018.stderr index d83934ccc239e..087d2e339548c 100644 --- a/src/test/ui/editions/edition-imports-2018.stderr +++ b/src/test/ui/editions/edition-imports-2018.stderr @@ -4,7 +4,7 @@ error: cannot glob-import all possible crates LL | gen_glob!(); | ^^^^^^^^^^^^ | - = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z macro-backtrace for more info) + = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) error: aborting due to previous error diff --git a/src/test/ui/editions/edition-imports-virtual-2015-gated.stderr b/src/test/ui/editions/edition-imports-virtual-2015-gated.stderr index 43a4c8a361fd9..56cbd882cca60 100644 --- a/src/test/ui/editions/edition-imports-virtual-2015-gated.stderr +++ b/src/test/ui/editions/edition-imports-virtual-2015-gated.stderr @@ -4,7 +4,7 @@ error[E0432]: unresolved import `E` LL | gen_gated!(); | ^^^^^^^^^^^^^ could not find `E` in `{{root}}` | - = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z macro-backtrace for more info) + = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) error: aborting due to previous error diff --git a/src/test/ui/editions/edition-keywords-2015-2018-expansion.stderr b/src/test/ui/editions/edition-keywords-2015-2018-expansion.stderr index f4b41d3accc51..f44f81fce7134 100644 --- a/src/test/ui/editions/edition-keywords-2015-2018-expansion.stderr +++ b/src/test/ui/editions/edition-keywords-2015-2018-expansion.stderr @@ -4,7 +4,7 @@ error: expected identifier, found keyword `async` LL | produces_async! {} | ^^^^^^^^^^^^^^^^^^ expected identifier, found keyword | - = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z macro-backtrace for more info) + = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) help: you can escape reserved keywords to use them as identifiers | LL | () => (pub fn r#async () { }) diff --git a/src/test/ui/editions/edition-keywords-2018-2018-expansion.stderr b/src/test/ui/editions/edition-keywords-2018-2018-expansion.stderr index d747b8232ebc3..a8fc58fc0cb8d 100644 --- a/src/test/ui/editions/edition-keywords-2018-2018-expansion.stderr +++ b/src/test/ui/editions/edition-keywords-2018-2018-expansion.stderr @@ -4,7 +4,7 @@ error: expected identifier, found keyword `async` LL | produces_async! {} | ^^^^^^^^^^^^^^^^^^ expected identifier, found keyword | - = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z macro-backtrace for more info) + = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) help: you can escape reserved keywords to use them as identifiers | LL | () => (pub fn r#async () { }) diff --git a/src/test/ui/error-codes/E0184.stderr b/src/test/ui/error-codes/E0184.stderr index b4128b9560664..591ea29ff8c52 100644 --- a/src/test/ui/error-codes/E0184.stderr +++ b/src/test/ui/error-codes/E0184.stderr @@ -3,6 +3,8 @@ error[E0184]: the trait `Copy` may not be implemented for this type; the type ha | LL | #[derive(Copy)] | ^^^^ Copy not allowed on types with destructors + | + = note: this error originates in a derive macro (in Nightly builds, run with -Z macro-backtrace for more info) error: aborting due to previous error diff --git a/src/test/ui/error-codes/E0665.stderr b/src/test/ui/error-codes/E0665.stderr index 2c2b498e39a43..3cb69492eb76d 100644 --- a/src/test/ui/error-codes/E0665.stderr +++ b/src/test/ui/error-codes/E0665.stderr @@ -3,6 +3,8 @@ error[E0665]: `Default` cannot be derived for enums, only structs | LL | #[derive(Default)] | ^^^^^^^ + | + = note: this error originates in a derive macro (in Nightly builds, run with -Z macro-backtrace for more info) error: aborting due to previous error diff --git a/src/test/ui/exclusive-drop-and-copy.stderr b/src/test/ui/exclusive-drop-and-copy.stderr index 9983aac4f9c06..f1e725ec34206 100644 --- a/src/test/ui/exclusive-drop-and-copy.stderr +++ b/src/test/ui/exclusive-drop-and-copy.stderr @@ -3,12 +3,16 @@ error[E0184]: the trait `Copy` may not be implemented for this type; the type ha | LL | #[derive(Copy, Clone)] | ^^^^ Copy not allowed on types with destructors + | + = note: this error originates in a derive macro (in Nightly builds, run with -Z macro-backtrace for more info) error[E0184]: the trait `Copy` may not be implemented for this type; the type has a destructor --> $DIR/exclusive-drop-and-copy.rs:10:10 | LL | #[derive(Copy, Clone)] | ^^^^ Copy not allowed on types with destructors + | + = note: this error originates in a derive macro (in Nightly builds, run with -Z macro-backtrace for more info) error: aborting due to 2 previous errors diff --git a/src/test/ui/feature-gates/feature-gate-allow-internal-unsafe-nested-macro.stderr b/src/test/ui/feature-gates/feature-gate-allow-internal-unsafe-nested-macro.stderr index 72f5642e72a2d..89c99b89ca804 100644 --- a/src/test/ui/feature-gates/feature-gate-allow-internal-unsafe-nested-macro.stderr +++ b/src/test/ui/feature-gates/feature-gate-allow-internal-unsafe-nested-macro.stderr @@ -8,6 +8,7 @@ LL | bar!(); | ------- in this macro invocation | = help: add `#![feature(allow_internal_unsafe)]` to the crate attributes to enable + = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) error: aborting due to previous error diff --git a/src/test/ui/feature-gates/feature-gate-allow-internal-unstable-nested-macro.stderr b/src/test/ui/feature-gates/feature-gate-allow-internal-unstable-nested-macro.stderr index 7100594336272..935b95668e82b 100644 --- a/src/test/ui/feature-gates/feature-gate-allow-internal-unstable-nested-macro.stderr +++ b/src/test/ui/feature-gates/feature-gate-allow-internal-unstable-nested-macro.stderr @@ -8,6 +8,7 @@ LL | bar!(); | ------- in this macro invocation | = help: add `#![feature(allow_internal_unstable)]` to the crate attributes to enable + = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) error: aborting due to previous error diff --git a/src/test/ui/feature-gates/feature-gate-concat_idents2.stderr b/src/test/ui/feature-gates/feature-gate-concat_idents2.stderr index 14519622c05ad..1c319c6dad4c0 100644 --- a/src/test/ui/feature-gates/feature-gate-concat_idents2.stderr +++ b/src/test/ui/feature-gates/feature-gate-concat_idents2.stderr @@ -12,6 +12,8 @@ error[E0425]: cannot find value `ab` in this scope | LL | concat_idents!(a, b); | ^^^^^^^^^^^^^^^^^^^^^ not found in this scope + | + = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) error: aborting due to 2 previous errors diff --git a/src/test/ui/half-open-range-patterns/half-open-range-pats-inclusive-dotdotdot-bad-syntax.stderr b/src/test/ui/half-open-range-patterns/half-open-range-pats-inclusive-dotdotdot-bad-syntax.stderr index ba2e7ea8b5354..3a9c918cd3720 100644 --- a/src/test/ui/half-open-range-patterns/half-open-range-pats-inclusive-dotdotdot-bad-syntax.stderr +++ b/src/test/ui/half-open-range-patterns/half-open-range-pats-inclusive-dotdotdot-bad-syntax.stderr @@ -30,6 +30,8 @@ LL | let ...$e; ... LL | mac!(0); | -------- in this macro invocation + | + = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) error: aborting due to 5 previous errors diff --git a/src/test/ui/half-open-range-patterns/half-open-range-pats-inclusive-no-end.stderr b/src/test/ui/half-open-range-patterns/half-open-range-pats-inclusive-no-end.stderr index 2bdb8ea57668a..871c9b57e5444 100644 --- a/src/test/ui/half-open-range-patterns/half-open-range-pats-inclusive-no-end.stderr +++ b/src/test/ui/half-open-range-patterns/half-open-range-pats-inclusive-no-end.stderr @@ -40,6 +40,7 @@ LL | mac!(0); | -------- in this macro invocation | = note: inclusive ranges must be bounded at the end (`..=b` or `a..=b`) + = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) error[E0586]: inclusive range with no end --> $DIR/half-open-range-pats-inclusive-no-end.rs:21:19 @@ -51,6 +52,7 @@ LL | mac!(0); | -------- in this macro invocation | = note: inclusive ranges must be bounded at the end (`..=b` or `a..=b`) + = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) error: aborting due to 6 previous errors diff --git a/src/test/ui/hr-subtype/hr-subtype.bound_a_b_ret_a_vs_bound_a_ret_a.stderr b/src/test/ui/hr-subtype/hr-subtype.bound_a_b_ret_a_vs_bound_a_ret_a.stderr index c8521a54e6c75..b91798fa12379 100644 --- a/src/test/ui/hr-subtype/hr-subtype.bound_a_b_ret_a_vs_bound_a_ret_a.stderr +++ b/src/test/ui/hr-subtype/hr-subtype.bound_a_b_ret_a_vs_bound_a_ret_a.stderr @@ -10,6 +10,7 @@ LL | | for<'a> fn(&'a u32, &'a u3 | = note: expected enum `std::option::Option fn(&'a u32, &'b u32) -> &'a u32>` found enum `std::option::Option fn(&'a u32, &'a u32) -> &'a u32>` + = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) error: aborting due to previous error diff --git a/src/test/ui/hr-subtype/hr-subtype.bound_a_b_vs_bound_a.stderr b/src/test/ui/hr-subtype/hr-subtype.bound_a_b_vs_bound_a.stderr index 3ad802c5450b3..45f53d4fe99db 100644 --- a/src/test/ui/hr-subtype/hr-subtype.bound_a_b_vs_bound_a.stderr +++ b/src/test/ui/hr-subtype/hr-subtype.bound_a_b_vs_bound_a.stderr @@ -10,6 +10,7 @@ LL | | for<'a> fn(&'a u32, &'a u32)) } | = note: expected enum `std::option::Option fn(&'a u32, &'b u32)>` found enum `std::option::Option fn(&'a u32, &'a u32)>` + = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) error: aborting due to previous error diff --git a/src/test/ui/hr-subtype/hr-subtype.bound_a_vs_free_x.stderr b/src/test/ui/hr-subtype/hr-subtype.bound_a_vs_free_x.stderr index 3d09633367cda..c3e4f6d2ed0c1 100644 --- a/src/test/ui/hr-subtype/hr-subtype.bound_a_vs_free_x.stderr +++ b/src/test/ui/hr-subtype/hr-subtype.bound_a_vs_free_x.stderr @@ -10,6 +10,7 @@ LL | | fn(&'x u32)) } | = note: expected enum `std::option::Option fn(&'a u32)>` found enum `std::option::Option` + = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) error: aborting due to previous error diff --git a/src/test/ui/hr-subtype/hr-subtype.bound_co_a_b_vs_bound_co_a.stderr b/src/test/ui/hr-subtype/hr-subtype.bound_co_a_b_vs_bound_co_a.stderr index 8b623a4c0bea9..4d7b86027f564 100644 --- a/src/test/ui/hr-subtype/hr-subtype.bound_co_a_b_vs_bound_co_a.stderr +++ b/src/test/ui/hr-subtype/hr-subtype.bound_co_a_b_vs_bound_co_a.stderr @@ -10,6 +10,7 @@ LL | | for<'a> fn(Co<'a>, Co<'a>)) } | = note: expected enum `std::option::Option fn(Co<'a>, Co<'b>)>` found enum `std::option::Option fn(Co<'a>, Co<'a>)>` + = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) error: aborting due to previous error diff --git a/src/test/ui/hr-subtype/hr-subtype.bound_co_a_co_b_ret_contra_a.stderr b/src/test/ui/hr-subtype/hr-subtype.bound_co_a_co_b_ret_contra_a.stderr index f12bff696913e..7f0a4197dd7fe 100644 --- a/src/test/ui/hr-subtype/hr-subtype.bound_co_a_co_b_ret_contra_a.stderr +++ b/src/test/ui/hr-subtype/hr-subtype.bound_co_a_co_b_ret_contra_a.stderr @@ -10,6 +10,7 @@ LL | | for<'a> fn(Co<'a>, Co<'a>) -> | = note: expected enum `std::option::Option fn(Co<'a>, Co<'b>) -> Contra<'a>>` found enum `std::option::Option fn(Co<'a>, Co<'a>) -> Contra<'a>>` + = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) error: aborting due to previous error diff --git a/src/test/ui/hr-subtype/hr-subtype.bound_contra_a_contra_b_ret_co_a.stderr b/src/test/ui/hr-subtype/hr-subtype.bound_contra_a_contra_b_ret_co_a.stderr index 37ba44cf2e9ba..c12e543a44e79 100644 --- a/src/test/ui/hr-subtype/hr-subtype.bound_contra_a_contra_b_ret_co_a.stderr +++ b/src/test/ui/hr-subtype/hr-subtype.bound_contra_a_contra_b_ret_co_a.stderr @@ -10,6 +10,7 @@ LL | | for<'a> fn(Contra<'a>, Con | = note: expected enum `std::option::Option fn(Contra<'a>, Contra<'b>) -> Co<'a>>` found enum `std::option::Option fn(Contra<'a>, Contra<'a>) -> Co<'a>>` + = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) error: aborting due to previous error diff --git a/src/test/ui/hr-subtype/hr-subtype.bound_inv_a_b_vs_bound_inv_a.stderr b/src/test/ui/hr-subtype/hr-subtype.bound_inv_a_b_vs_bound_inv_a.stderr index a00bbea6d1818..460356856bd56 100644 --- a/src/test/ui/hr-subtype/hr-subtype.bound_inv_a_b_vs_bound_inv_a.stderr +++ b/src/test/ui/hr-subtype/hr-subtype.bound_inv_a_b_vs_bound_inv_a.stderr @@ -10,6 +10,7 @@ LL | | for<'a> fn(Inv<'a>, Inv<'a>)) | = note: expected enum `std::option::Option fn(Inv<'a>, Inv<'b>)>` found enum `std::option::Option fn(Inv<'a>, Inv<'a>)>` + = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) error: aborting due to previous error diff --git a/src/test/ui/hr-subtype/hr-subtype.free_inv_x_vs_free_inv_y.nll.stderr b/src/test/ui/hr-subtype/hr-subtype.free_inv_x_vs_free_inv_y.nll.stderr index 9b0c987c0545d..6b5e7a5a6345a 100644 --- a/src/test/ui/hr-subtype/hr-subtype.free_inv_x_vs_free_inv_y.nll.stderr +++ b/src/test/ui/hr-subtype/hr-subtype.free_inv_x_vs_free_inv_y.nll.stderr @@ -13,6 +13,7 @@ LL | | fn(Inv<'y>)) } | |__________________________________________________- in this macro invocation | = help: consider adding the following bound: `'x: 'y` + = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) error: lifetime may not live long enough --> $DIR/hr-subtype.rs:39:13 @@ -29,6 +30,7 @@ LL | | fn(Inv<'y>)) } | |__________________________________________________- in this macro invocation | = help: consider adding the following bound: `'x: 'y` + = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) error: aborting due to 2 previous errors diff --git a/src/test/ui/hr-subtype/hr-subtype.free_inv_x_vs_free_inv_y.stderr b/src/test/ui/hr-subtype/hr-subtype.free_inv_x_vs_free_inv_y.stderr index 561f35191767e..fc3643306e628 100644 --- a/src/test/ui/hr-subtype/hr-subtype.free_inv_x_vs_free_inv_y.stderr +++ b/src/test/ui/hr-subtype/hr-subtype.free_inv_x_vs_free_inv_y.stderr @@ -28,6 +28,7 @@ LL | fn subtype<'x,'y:'x,'z:'y>() { LL | / check! { free_inv_x_vs_free_inv_y: (fn(Inv<'x>), LL | | fn(Inv<'y>)) } | |__________________________________________________- in this macro invocation + = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) error[E0308]: mismatched types --> $DIR/hr-subtype.rs:39:26 @@ -59,6 +60,7 @@ LL | fn supertype<'x,'y:'x,'z:'y>() { LL | / check! { free_inv_x_vs_free_inv_y: (fn(Inv<'x>), LL | | fn(Inv<'y>)) } | |__________________________________________________- in this macro invocation + = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) error: aborting due to 2 previous errors diff --git a/src/test/ui/hr-subtype/hr-subtype.free_x_vs_free_y.nll.stderr b/src/test/ui/hr-subtype/hr-subtype.free_x_vs_free_y.nll.stderr index 48558fad0051e..7c0770924daaa 100644 --- a/src/test/ui/hr-subtype/hr-subtype.free_x_vs_free_y.nll.stderr +++ b/src/test/ui/hr-subtype/hr-subtype.free_x_vs_free_y.nll.stderr @@ -13,6 +13,7 @@ LL | | fn(&'y u32)) } | |__________________________________________- in this macro invocation | = help: consider adding the following bound: `'x: 'y` + = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) error: aborting due to previous error diff --git a/src/test/ui/hr-subtype/hr-subtype.free_x_vs_free_y.stderr b/src/test/ui/hr-subtype/hr-subtype.free_x_vs_free_y.stderr index 082627050b357..0dde27788f629 100644 --- a/src/test/ui/hr-subtype/hr-subtype.free_x_vs_free_y.stderr +++ b/src/test/ui/hr-subtype/hr-subtype.free_x_vs_free_y.stderr @@ -28,6 +28,7 @@ LL | fn supertype<'x,'y:'x,'z:'y>() { LL | / check! { free_x_vs_free_y: (fn(&'x u32), LL | | fn(&'y u32)) } | |__________________________________________- in this macro invocation + = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) error: aborting due to previous error diff --git a/src/test/ui/hygiene/assoc_item_ctxt.stderr b/src/test/ui/hygiene/assoc_item_ctxt.stderr index 0d1c73eef0e23..dec1bd62ca936 100644 --- a/src/test/ui/hygiene/assoc_item_ctxt.stderr +++ b/src/test/ui/hygiene/assoc_item_ctxt.stderr @@ -6,6 +6,8 @@ LL | fn method() {} ... LL | mac_trait_impl!(); | ------------------ in this macro invocation + | + = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) error[E0046]: not all trait items implemented, missing: `method` --> $DIR/assoc_item_ctxt.rs:34:9 @@ -18,6 +20,8 @@ LL | impl Tr for u8 { ... LL | mac_trait_impl!(); | ------------------ in this macro invocation + | + = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) error: aborting due to 2 previous errors diff --git a/src/test/ui/hygiene/duplicate_lifetimes.stderr b/src/test/ui/hygiene/duplicate_lifetimes.stderr index 7aaea6ff24e39..04f5bed5e05ea 100644 --- a/src/test/ui/hygiene/duplicate_lifetimes.stderr +++ b/src/test/ui/hygiene/duplicate_lifetimes.stderr @@ -9,6 +9,8 @@ LL | m!('a); | | | | | previous declaration here | in this macro invocation + | + = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) error[E0263]: lifetime name `'a` declared twice in the same scope --> $DIR/duplicate_lifetimes.rs:13:14 @@ -21,6 +23,8 @@ LL | n!('a); | | | | | previous declaration here | in this macro invocation + | + = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) error: aborting due to 2 previous errors diff --git a/src/test/ui/hygiene/extern-prelude-from-opaque-fail.stderr b/src/test/ui/hygiene/extern-prelude-from-opaque-fail.stderr index 65133eb1e1873..b9e05c84a8aea 100644 --- a/src/test/ui/hygiene/extern-prelude-from-opaque-fail.stderr +++ b/src/test/ui/hygiene/extern-prelude-from-opaque-fail.stderr @@ -15,6 +15,8 @@ LL | use my_core; ... LL | a!(); | ----- in this macro invocation + | + = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) error[E0433]: failed to resolve: use of undeclared type or module `my_core` --> $DIR/extern-prelude-from-opaque-fail.rs:11:18 @@ -24,6 +26,8 @@ LL | fn f() { my_core::mem::drop(0); } ... LL | a!(); | ----- in this macro invocation + | + = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) error[E0433]: failed to resolve: use of undeclared type or module `my_core` --> $DIR/extern-prelude-from-opaque-fail.rs:24:14 diff --git a/src/test/ui/hygiene/fields-definition.stderr b/src/test/ui/hygiene/fields-definition.stderr index a30650d88e28d..8070ffdfdeb89 100644 --- a/src/test/ui/hygiene/fields-definition.stderr +++ b/src/test/ui/hygiene/fields-definition.stderr @@ -8,6 +8,8 @@ LL | $a: u8, ... LL | legacy!(a); | ----------- in this macro invocation + | + = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) error: aborting due to previous error diff --git a/src/test/ui/hygiene/fields-move.stderr b/src/test/ui/hygiene/fields-move.stderr index 562f60e31b5d2..5ce786dce837c 100644 --- a/src/test/ui/hygiene/fields-move.stderr +++ b/src/test/ui/hygiene/fields-move.stderr @@ -10,6 +10,7 @@ LL | assert_two_copies(copy_legacy!(foo), foo.x); | ----------------- in this macro invocation | = note: move occurs because `foo.x` has type `NonCopy`, which does not implement the `Copy` trait + = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) error[E0382]: use of moved value: `foo.x` --> $DIR/fields-move.rs:28:42 diff --git a/src/test/ui/hygiene/fields.stderr b/src/test/ui/hygiene/fields.stderr index 20ea4e91067be..89deef492020d 100644 --- a/src/test/ui/hygiene/fields.stderr +++ b/src/test/ui/hygiene/fields.stderr @@ -6,6 +6,8 @@ LL | let s = S { x: 0 }; ... LL | let s = foo::m!(S, x); | ------------- in this macro invocation + | + = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) error: type `foo::S` is private --> $DIR/fields.rs:16:17 @@ -15,6 +17,8 @@ LL | let _ = s.x; ... LL | let s = foo::m!(S, x); | ------------- in this macro invocation + | + = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) error: type `foo::T` is private --> $DIR/fields.rs:18:17 @@ -24,6 +28,8 @@ LL | let t = T(0); ... LL | let s = foo::m!(S, x); | ------------- in this macro invocation + | + = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) error: type `foo::T` is private --> $DIR/fields.rs:19:17 @@ -33,6 +39,8 @@ LL | let _ = t.0; ... LL | let s = foo::m!(S, x); | ------------- in this macro invocation + | + = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) error: aborting due to 4 previous errors diff --git a/src/test/ui/hygiene/generate-mod.stderr b/src/test/ui/hygiene/generate-mod.stderr index 5e2c56d4bf4d4..073e1527b2e11 100644 --- a/src/test/ui/hygiene/generate-mod.stderr +++ b/src/test/ui/hygiene/generate-mod.stderr @@ -18,6 +18,8 @@ LL | type A = FromOutside; ... LL | genmod_transparent!(); | ---------------------- in this macro invocation + | + = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) error[E0412]: cannot find type `Outer` in this scope --> $DIR/generate-mod.rs:20:22 @@ -27,6 +29,8 @@ LL | type Inner = Outer; ... LL | genmod_transparent!(); | ---------------------- in this macro invocation + | + = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) error[E0412]: cannot find type `FromOutside` in this scope --> $DIR/generate-mod.rs:28:18 @@ -36,6 +40,8 @@ LL | type A = FromOutside; ... LL | genmod_legacy!(); | ----------------- in this macro invocation + | + = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) error[E0412]: cannot find type `Outer` in this scope --> $DIR/generate-mod.rs:29:22 @@ -45,6 +51,8 @@ LL | type Inner = Outer; ... LL | genmod_legacy!(); | ----------------- in this macro invocation + | + = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) error: aborting due to 6 previous errors diff --git a/src/test/ui/hygiene/globs.stderr b/src/test/ui/hygiene/globs.stderr index f9fbf295aecc9..153ad8cbecfcd 100644 --- a/src/test/ui/hygiene/globs.stderr +++ b/src/test/ui/hygiene/globs.stderr @@ -22,6 +22,7 @@ LL | | f(); LL | | } | |_____- in this macro invocation | + = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) help: possible candidates are found in other modules, you can import them into scope | LL | use bar::g; @@ -42,6 +43,7 @@ LL | n!(f); | = note: possible candidate is found in another module, you can import it into scope: foo::f + = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) error[E0425]: cannot find function `f` in this scope --> $DIR/globs.rs:65:17 @@ -54,6 +56,7 @@ LL | f | = note: possible candidate is found in another module, you can import it into scope: foo::f + = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) error: aborting due to 4 previous errors diff --git a/src/test/ui/hygiene/hygienic-label-1.stderr b/src/test/ui/hygiene/hygienic-label-1.stderr index d61c0687c1665..60df494e131c6 100644 --- a/src/test/ui/hygiene/hygienic-label-1.stderr +++ b/src/test/ui/hygiene/hygienic-label-1.stderr @@ -6,6 +6,8 @@ LL | () => { break 'x; } ... LL | 'x: loop { foo!() } | ------ in this macro invocation + | + = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) error: aborting due to previous error diff --git a/src/test/ui/hygiene/hygienic-label-3.stderr b/src/test/ui/hygiene/hygienic-label-3.stderr index 0c4173a61aac4..dbec71fcaa402 100644 --- a/src/test/ui/hygiene/hygienic-label-3.stderr +++ b/src/test/ui/hygiene/hygienic-label-3.stderr @@ -6,6 +6,8 @@ LL | () => { break 'x; } ... LL | foo!() | ------ in this macro invocation + | + = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) error: aborting due to previous error diff --git a/src/test/ui/hygiene/hygienic-labels-in-let.stderr b/src/test/ui/hygiene/hygienic-labels-in-let.stderr index 4acb34f2dcebe..7c82a08753aa2 100644 --- a/src/test/ui/hygiene/hygienic-labels-in-let.stderr +++ b/src/test/ui/hygiene/hygienic-labels-in-let.stderr @@ -9,6 +9,8 @@ LL | 'x: loop { LL | // this 'x should refer to the outer loop, lexically LL | loop_x!(break 'x); | ------------------ in this macro invocation + | + = note: this warning originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) warning: label name `'x` shadows a label name that is already in scope --> $DIR/hygienic-labels-in-let.rs:64:9 @@ -39,6 +41,8 @@ LL | 'x: loop { ... LL | loop_x!(break 'x); | ------------------ in this macro invocation + | + = note: this warning originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) warning: label name `'x` shadows a label name that is already in scope --> $DIR/hygienic-labels-in-let.rs:16:9 @@ -51,6 +55,8 @@ LL | 'x: loop { $e } ... LL | loop_x!(break 'x); | ------------------ in this macro invocation + | + = note: this warning originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) warning: label name `'x` shadows a label name that is already in scope --> $DIR/hygienic-labels-in-let.rs:16:9 @@ -63,6 +69,8 @@ LL | 'x: for _ in 0..1 { ... LL | loop_x!(break 'x); | ------------------ in this macro invocation + | + = note: this warning originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) warning: label name `'x` shadows a label name that is already in scope --> $DIR/hygienic-labels-in-let.rs:76:9 @@ -111,6 +119,8 @@ LL | 'x: loop { ... LL | while_true!(break 'x); | ---------------------- in this macro invocation + | + = note: this warning originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) warning: label name `'x` shadows a label name that is already in scope --> $DIR/hygienic-labels-in-let.rs:27:9 @@ -123,6 +133,8 @@ LL | 'x: while 1 + 1 == 2 { $e } ... LL | while_true!(break 'x); | ---------------------- in this macro invocation + | + = note: this warning originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) warning: label name `'x` shadows a label name that is already in scope --> $DIR/hygienic-labels-in-let.rs:27:9 @@ -135,6 +147,8 @@ LL | 'x: for _ in 0..1 { ... LL | while_true!(break 'x); | ---------------------- in this macro invocation + | + = note: this warning originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) warning: label name `'x` shadows a label name that is already in scope --> $DIR/hygienic-labels-in-let.rs:27:9 @@ -147,6 +161,8 @@ LL | 'x: while 1 + 1 == 2 { $e } ... LL | while_true!(break 'x); | ---------------------- in this macro invocation + | + = note: this warning originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) warning: label name `'x` shadows a label name that is already in scope --> $DIR/hygienic-labels-in-let.rs:27:9 @@ -159,6 +175,8 @@ LL | 'x: for _ in 0..1 { ... LL | while_true!(break 'x); | ---------------------- in this macro invocation + | + = note: this warning originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) warning: label name `'x` shadows a label name that is already in scope --> $DIR/hygienic-labels-in-let.rs:90:9 @@ -225,6 +243,8 @@ LL | 'x: loop { ... LL | run_once!(continue 'x); | ----------------------- in this macro invocation + | + = note: this warning originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) warning: label name `'x` shadows a label name that is already in scope --> $DIR/hygienic-labels-in-let.rs:39:9 @@ -237,6 +257,8 @@ LL | 'x: for _ in 0..1 { $e } ... LL | run_once!(continue 'x); | ----------------------- in this macro invocation + | + = note: this warning originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) warning: label name `'x` shadows a label name that is already in scope --> $DIR/hygienic-labels-in-let.rs:39:9 @@ -249,6 +271,8 @@ LL | 'x: for _ in 0..1 { ... LL | run_once!(continue 'x); | ----------------------- in this macro invocation + | + = note: this warning originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) warning: label name `'x` shadows a label name that is already in scope --> $DIR/hygienic-labels-in-let.rs:39:9 @@ -261,6 +285,8 @@ LL | 'x: for _ in 0..1 { $e } ... LL | run_once!(continue 'x); | ----------------------- in this macro invocation + | + = note: this warning originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) warning: label name `'x` shadows a label name that is already in scope --> $DIR/hygienic-labels-in-let.rs:39:9 @@ -273,6 +299,8 @@ LL | 'x: for _ in 0..1 { ... LL | run_once!(continue 'x); | ----------------------- in this macro invocation + | + = note: this warning originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) warning: label name `'x` shadows a label name that is already in scope --> $DIR/hygienic-labels-in-let.rs:39:9 @@ -285,6 +313,8 @@ LL | 'x: for _ in 0..1 { $e } ... LL | run_once!(continue 'x); | ----------------------- in this macro invocation + | + = note: this warning originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) warning: label name `'x` shadows a label name that is already in scope --> $DIR/hygienic-labels-in-let.rs:39:9 @@ -297,4 +327,6 @@ LL | 'x: for _ in 0..1 { ... LL | run_once!(continue 'x); | ----------------------- in this macro invocation + | + = note: this warning originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) diff --git a/src/test/ui/hygiene/hygienic-labels.stderr b/src/test/ui/hygiene/hygienic-labels.stderr index 0833825940a85..960da15ef3c97 100644 --- a/src/test/ui/hygiene/hygienic-labels.stderr +++ b/src/test/ui/hygiene/hygienic-labels.stderr @@ -9,6 +9,8 @@ LL | 'x: for _ in 0..1 { LL | // this 'x should refer to the outer loop, lexically LL | loop_x!(break 'x); | ------------------ in this macro invocation + | + = note: this warning originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) warning: label name `'x` shadows a label name that is already in scope --> $DIR/hygienic-labels.rs:54:5 @@ -39,6 +41,8 @@ LL | 'x: for _ in 0..1 { ... LL | loop_x!(break 'x); | ------------------ in this macro invocation + | + = note: this warning originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) warning: label name `'x` shadows a label name that is already in scope --> $DIR/hygienic-labels.rs:13:9 @@ -51,6 +55,8 @@ LL | 'x: loop { $e } ... LL | loop_x!(break 'x); | ------------------ in this macro invocation + | + = note: this warning originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) warning: label name `'x` shadows a label name that is already in scope --> $DIR/hygienic-labels.rs:13:9 @@ -63,6 +69,8 @@ LL | 'x: loop { ... LL | loop_x!(break 'x); | ------------------ in this macro invocation + | + = note: this warning originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) warning: label name `'x` shadows a label name that is already in scope --> $DIR/hygienic-labels.rs:63:5 @@ -111,6 +119,8 @@ LL | 'x: for _ in 0..1 { ... LL | while_x!(break 'x); | ------------------- in this macro invocation + | + = note: this warning originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) warning: label name `'x` shadows a label name that is already in scope --> $DIR/hygienic-labels.rs:38:9 @@ -123,6 +133,8 @@ LL | 'x: while 1 + 1 == 2 { $e } ... LL | while_x!(break 'x); | ------------------- in this macro invocation + | + = note: this warning originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) warning: label name `'x` shadows a label name that is already in scope --> $DIR/hygienic-labels.rs:38:9 @@ -135,6 +147,8 @@ LL | 'x: loop { ... LL | while_x!(break 'x); | ------------------- in this macro invocation + | + = note: this warning originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) warning: label name `'x` shadows a label name that is already in scope --> $DIR/hygienic-labels.rs:38:9 @@ -147,6 +161,8 @@ LL | 'x: while 1 + 1 == 2 { $e } ... LL | while_x!(break 'x); | ------------------- in this macro invocation + | + = note: this warning originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) warning: label name `'x` shadows a label name that is already in scope --> $DIR/hygienic-labels.rs:38:9 @@ -159,6 +175,8 @@ LL | 'x: while 1 + 1 == 2 { ... LL | while_x!(break 'x); | ------------------- in this macro invocation + | + = note: this warning originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) warning: label name `'x` shadows a label name that is already in scope --> $DIR/hygienic-labels.rs:73:5 @@ -225,6 +243,8 @@ LL | 'x: for _ in 0..1 { ... LL | run_once!(continue 'x); | ----------------------- in this macro invocation + | + = note: this warning originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) warning: label name `'x` shadows a label name that is already in scope --> $DIR/hygienic-labels.rs:24:9 @@ -237,6 +257,8 @@ LL | 'x: for _ in 0..1 { $e } ... LL | run_once!(continue 'x); | ----------------------- in this macro invocation + | + = note: this warning originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) warning: label name `'x` shadows a label name that is already in scope --> $DIR/hygienic-labels.rs:24:9 @@ -249,6 +271,8 @@ LL | 'x: loop { ... LL | run_once!(continue 'x); | ----------------------- in this macro invocation + | + = note: this warning originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) warning: label name `'x` shadows a label name that is already in scope --> $DIR/hygienic-labels.rs:24:9 @@ -261,6 +285,8 @@ LL | 'x: for _ in 0..1 { $e } ... LL | run_once!(continue 'x); | ----------------------- in this macro invocation + | + = note: this warning originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) warning: label name `'x` shadows a label name that is already in scope --> $DIR/hygienic-labels.rs:24:9 @@ -273,6 +299,8 @@ LL | 'x: while 1 + 1 == 2 { ... LL | run_once!(continue 'x); | ----------------------- in this macro invocation + | + = note: this warning originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) warning: label name `'x` shadows a label name that is already in scope --> $DIR/hygienic-labels.rs:24:9 @@ -285,6 +313,8 @@ LL | 'x: while 1 + 1 == 2 { $e } ... LL | run_once!(continue 'x); | ----------------------- in this macro invocation + | + = note: this warning originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) warning: label name `'x` shadows a label name that is already in scope --> $DIR/hygienic-labels.rs:24:9 @@ -297,4 +327,6 @@ LL | 'x: for _ in 0..1 { ... LL | run_once!(continue 'x); | ----------------------- in this macro invocation + | + = note: this warning originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) diff --git a/src/test/ui/hygiene/impl_items.stderr b/src/test/ui/hygiene/impl_items.stderr index 418c2c73ba157..85ee9f4cbf3e6 100644 --- a/src/test/ui/hygiene/impl_items.stderr +++ b/src/test/ui/hygiene/impl_items.stderr @@ -6,6 +6,8 @@ LL | let _: () = S.f(); ... LL | foo::m!(); | ---------- in this macro invocation + | + = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) error: aborting due to previous error diff --git a/src/test/ui/hygiene/intercrate.stderr b/src/test/ui/hygiene/intercrate.stderr index 75347d6e8c950..3912ca337fbec 100644 --- a/src/test/ui/hygiene/intercrate.stderr +++ b/src/test/ui/hygiene/intercrate.stderr @@ -4,7 +4,7 @@ error: type `fn() -> u32 {intercrate::foo::bar::f}` is private LL | assert_eq!(intercrate::foo::m!(), 1); | ^^^^^^^^^^^^^^^^^^^^^ | - = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z macro-backtrace for more info) + = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) error: aborting due to previous error diff --git a/src/test/ui/hygiene/no_implicit_prelude.stderr b/src/test/ui/hygiene/no_implicit_prelude.stderr index a466471d5e4ec..986671c7810e7 100644 --- a/src/test/ui/hygiene/no_implicit_prelude.stderr +++ b/src/test/ui/hygiene/no_implicit_prelude.stderr @@ -4,7 +4,7 @@ error: cannot find macro `panic` in this scope LL | assert_eq!(0, 0); | ^^^^^^^^^^^^^^^^^ | - = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z macro-backtrace for more info) + = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) error[E0433]: failed to resolve: use of undeclared type or module `Vec` --> $DIR/no_implicit_prelude.rs:11:9 @@ -14,6 +14,8 @@ LL | fn f() { ::bar::m!(); } ... LL | Vec::new(); | ^^^ use of undeclared type or module `Vec` + | + = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) error[E0599]: no method named `clone` found for unit type `()` in the current scope --> $DIR/no_implicit_prelude.rs:12:12 @@ -27,6 +29,7 @@ LL | ().clone() = help: items from traits can only be used if the trait is in scope = note: the following trait is implemented but not in scope; perhaps add a `use` for it: `use std::clone::Clone;` + = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) error: aborting due to 3 previous errors diff --git a/src/test/ui/hygiene/privacy-early.stderr b/src/test/ui/hygiene/privacy-early.stderr index 60e50e05fc30e..afc94bf79f682 100644 --- a/src/test/ui/hygiene/privacy-early.stderr +++ b/src/test/ui/hygiene/privacy-early.stderr @@ -15,6 +15,7 @@ LL | use f as g; ... LL | foo::m!(); | ---------- in this macro invocation + = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) error: aborting due to previous error diff --git a/src/test/ui/hygiene/trait_items.stderr b/src/test/ui/hygiene/trait_items.stderr index 8e3609292a7f9..d24336883e963 100644 --- a/src/test/ui/hygiene/trait_items.stderr +++ b/src/test/ui/hygiene/trait_items.stderr @@ -10,6 +10,7 @@ LL | pub macro m() { ().f() } = help: items from traits can only be used if the trait is in scope = note: the following trait is implemented but not in scope; perhaps add a `use` for it: `use foo::T;` + = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) error: aborting due to previous error diff --git a/src/test/ui/if/if-let.stderr b/src/test/ui/if/if-let.stderr index 570a64e999cd0..ad4aefb6e58a7 100644 --- a/src/test/ui/if/if-let.stderr +++ b/src/test/ui/if/if-let.stderr @@ -10,6 +10,7 @@ LL | | }); | |_______- in this macro invocation | = note: `#[warn(irrefutable_let_patterns)]` on by default + = note: this warning originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) warning: irrefutable if-let pattern --> $DIR/if-let.rs:6:13 @@ -21,6 +22,8 @@ LL | / bar!(a, 1, { LL | | println!("irrefutable pattern"); LL | | }); | |_______- in this macro invocation + | + = note: this warning originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) warning: irrefutable if-let pattern --> $DIR/if-let.rs:26:5 diff --git a/src/test/ui/if/ifmt-bad-arg.stderr b/src/test/ui/if/ifmt-bad-arg.stderr index c024094dd5610..3e5f5a6374216 100644 --- a/src/test/ui/if/ifmt-bad-arg.stderr +++ b/src/test/ui/if/ifmt-bad-arg.stderr @@ -300,6 +300,7 @@ LL | println!("{} {:.*} {}", 1, 3.2, 4); | = note: expected reference `&usize` found reference `&{float}` + = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) error[E0308]: mismatched types --> $DIR/ifmt-bad-arg.rs:81:35 @@ -309,6 +310,7 @@ LL | println!("{} {:07$.*} {}", 1, 3.2, 4); | = note: expected reference `&usize` found reference `&{float}` + = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) error: aborting due to 36 previous errors diff --git a/src/test/ui/if/ifmt-bad-format-args.stderr b/src/test/ui/if/ifmt-bad-format-args.stderr index 23252b6b5f4fc..8bb0d40629f0a 100644 --- a/src/test/ui/if/ifmt-bad-format-args.stderr +++ b/src/test/ui/if/ifmt-bad-format-args.stderr @@ -3,6 +3,8 @@ error: requires at least a format string argument | LL | format_args!(); | ^^^^^^^^^^^^^^^ + | + = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) error: format argument must be a string literal --> $DIR/ifmt-bad-format-args.rs:3:18 diff --git a/src/test/ui/if/ifmt-unimpl.stderr b/src/test/ui/if/ifmt-unimpl.stderr index 7a7e4b34d2595..a142896ada557 100644 --- a/src/test/ui/if/ifmt-unimpl.stderr +++ b/src/test/ui/if/ifmt-unimpl.stderr @@ -6,6 +6,7 @@ LL | format!("{:X}", "3"); | = note: required because of the requirements on the impl of `std::fmt::UpperHex` for `&str` = note: required by `std::fmt::UpperHex::fmt` + = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) error: aborting due to previous error diff --git a/src/test/ui/imports/extern-prelude-extern-crate-fail.stderr b/src/test/ui/imports/extern-prelude-extern-crate-fail.stderr index e067432b39237..f7544306d3434 100644 --- a/src/test/ui/imports/extern-prelude-extern-crate-fail.stderr +++ b/src/test/ui/imports/extern-prelude-extern-crate-fail.stderr @@ -6,6 +6,8 @@ LL | extern crate std as non_existent; ... LL | define_std_as_non_existent!(); | ------------------------------ in this macro invocation + | + = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) error[E0433]: failed to resolve: use of undeclared type or module `two_macros` --> $DIR/extern-prelude-extern-crate-fail.rs:10:9 diff --git a/src/test/ui/imports/extern-prelude-extern-crate-restricted-shadowing.stderr b/src/test/ui/imports/extern-prelude-extern-crate-restricted-shadowing.stderr index 245013a4ea43e..e344d0591473d 100644 --- a/src/test/ui/imports/extern-prelude-extern-crate-restricted-shadowing.stderr +++ b/src/test/ui/imports/extern-prelude-extern-crate-restricted-shadowing.stderr @@ -6,6 +6,8 @@ LL | extern crate std as core; ... LL | define_other_core!(); | --------------------- in this macro invocation + | + = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) error[E0659]: `Vec` is ambiguous (macro-expanded name vs less macro-expanded name from outer scope during import/macro resolution) --> $DIR/extern-prelude-extern-crate-restricted-shadowing.rs:17:9 @@ -26,6 +28,7 @@ note: `Vec` could also refer to the struct defined here | LL | pub use crate::vec::Vec; | ^^^^^^^^^^^^^^^ + = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) error: aborting due to 2 previous errors diff --git a/src/test/ui/imports/import-crate-var.stderr b/src/test/ui/imports/import-crate-var.stderr index 11eca073f9558..6bc2d15b2ff1b 100644 --- a/src/test/ui/imports/import-crate-var.stderr +++ b/src/test/ui/imports/import-crate-var.stderr @@ -4,7 +4,7 @@ error: `$crate` may not be imported LL | m!(); | ^^^^^ | - = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z macro-backtrace for more info) + = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) error: aborting due to previous error diff --git a/src/test/ui/imports/import-prefix-macro-1.stderr b/src/test/ui/imports/import-prefix-macro-1.stderr index 6c12a366b7152..2ecc519e718f6 100644 --- a/src/test/ui/imports/import-prefix-macro-1.stderr +++ b/src/test/ui/imports/import-prefix-macro-1.stderr @@ -6,6 +6,8 @@ LL | ($p: path) => (use $p {S, Z}); ... LL | import! { a::b::c } | ------------------- in this macro invocation + | + = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) error: aborting due to previous error diff --git a/src/test/ui/imports/import-prefix-macro-2.stderr b/src/test/ui/imports/import-prefix-macro-2.stderr index 8428dce2728af..80317a34944c6 100644 --- a/src/test/ui/imports/import-prefix-macro-2.stderr +++ b/src/test/ui/imports/import-prefix-macro-2.stderr @@ -6,6 +6,8 @@ LL | ($p: path) => (use ::$p {S, Z}); ... LL | import! { a::b::c } | ------------------- in this macro invocation + | + = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) error: aborting due to previous error diff --git a/src/test/ui/imports/local-modularized-tricky-fail-1.stderr b/src/test/ui/imports/local-modularized-tricky-fail-1.stderr index c9498fed6a58e..ea720c8b8730d 100644 --- a/src/test/ui/imports/local-modularized-tricky-fail-1.stderr +++ b/src/test/ui/imports/local-modularized-tricky-fail-1.stderr @@ -20,6 +20,7 @@ note: `exported` could also refer to the macro imported here LL | use inner1::*; | ^^^^^^^^^ = help: consider adding an explicit import of `exported` to disambiguate + = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) error[E0659]: `exported` is ambiguous (glob import vs macro-expanded name in the same module during import/macro resolution) --> $DIR/local-modularized-tricky-fail-1.rs:28:1 @@ -43,6 +44,7 @@ note: `exported` could also refer to the macro imported here LL | use inner1::*; | ^^^^^^^^^ = help: consider adding an explicit import of `exported` to disambiguate + = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) error[E0659]: `panic` is ambiguous (macro-expanded name vs less macro-expanded name from outer scope during import/macro resolution) --> $DIR/local-modularized-tricky-fail-1.rs:36:5 @@ -62,6 +64,7 @@ LL | | } LL | define_panic!(); | ---------------- in this macro invocation = help: use `crate::panic` to refer to this macro unambiguously + = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) error[E0659]: `include` is ambiguous (macro-expanded name vs less macro-expanded name from outer scope during import/macro resolution) --> $DIR/local-modularized-tricky-fail-1.rs:47:1 @@ -81,6 +84,7 @@ LL | | } LL | define_include!(); | ------------------ in this macro invocation = help: use `crate::include` to refer to this macro unambiguously + = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) error: aborting due to 4 previous errors diff --git a/src/test/ui/imports/local-modularized-tricky-fail-2.stderr b/src/test/ui/imports/local-modularized-tricky-fail-2.stderr index 92a836cadfa7b..07b7ff942a658 100644 --- a/src/test/ui/imports/local-modularized-tricky-fail-2.stderr +++ b/src/test/ui/imports/local-modularized-tricky-fail-2.stderr @@ -9,6 +9,7 @@ LL | () => ( struct Б; ) | = note: for more information, see https://github.com/rust-lang/rust/issues/55467 = help: add `#![feature(non_ascii_idents)]` to the crate attributes to enable + = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) error[E0658]: non-ascii idents are not fully supported --> $DIR/local-modularized-tricky-fail-2.rs:36:24 @@ -21,6 +22,7 @@ LL | () => ( struct Г; ) | = note: for more information, see https://github.com/rust-lang/rust/issues/55467 = help: add `#![feature(non_ascii_idents)]` to the crate attributes to enable + = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) error[E0658]: non-ascii idents are not fully supported --> $DIR/local-modularized-tricky-fail-2.rs:46:24 @@ -33,6 +35,7 @@ LL | () => ( struct Д; ) | = note: for more information, see https://github.com/rust-lang/rust/issues/55467 = help: add `#![feature(non_ascii_idents)]` to the crate attributes to enable + = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) error: aborting due to 3 previous errors diff --git a/src/test/ui/imports/local-modularized-tricky-fail-3.stderr b/src/test/ui/imports/local-modularized-tricky-fail-3.stderr index 5272d2a319faa..4494a88a5cf95 100644 --- a/src/test/ui/imports/local-modularized-tricky-fail-3.stderr +++ b/src/test/ui/imports/local-modularized-tricky-fail-3.stderr @@ -17,6 +17,7 @@ LL | | } ... LL | define_exported!(); | ------------------- in this macro invocation + = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) error: macro-expanded `macro_export` macros from the current crate cannot be referred to by absolute paths --> $DIR/local-modularized-tricky-fail-3.rs:19:5 @@ -36,6 +37,7 @@ LL | | } ... LL | define_exported!(); | ------------------- in this macro invocation + = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) error: aborting due to 2 previous errors diff --git a/src/test/ui/imports/shadow_builtin_macros.stderr b/src/test/ui/imports/shadow_builtin_macros.stderr index 2f2ab20cdf077..413ead8c25edc 100644 --- a/src/test/ui/imports/shadow_builtin_macros.stderr +++ b/src/test/ui/imports/shadow_builtin_macros.stderr @@ -28,6 +28,7 @@ LL | macro_rules! panic { () => {} } LL | } } LL | m!(); | ----- in this macro invocation + = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) error[E0659]: `n` is ambiguous (glob import vs any other name from outer scope during import/macro resolution) --> $DIR/shadow_builtin_macros.rs:49:5 diff --git a/src/test/ui/in-band-lifetimes/elided-lifetimes.stderr b/src/test/ui/in-band-lifetimes/elided-lifetimes.stderr index 1184f51680a0e..6eddd9c411bc5 100644 --- a/src/test/ui/in-band-lifetimes/elided-lifetimes.stderr +++ b/src/test/ui/in-band-lifetimes/elided-lifetimes.stderr @@ -36,6 +36,8 @@ LL | fn $fn_name(gift: &str) -> $type_name { ... LL | autowrapper!(Autowrapped, autowrap_gift, 'a); | --------------------------------------------- in this macro invocation + | + = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) error: hidden lifetime parameters in types are deprecated --> $DIR/elided-lifetimes.rs:78:18 @@ -51,6 +53,8 @@ LL | Ref<($($types),*)> ... LL | let yellow: anytuple_ref_ty!(bool, &str) = laughter.borrow(); | ---------------------------- in this macro invocation + | + = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) error: aborting due to 7 previous errors diff --git a/src/test/ui/include-macros/mismatched-types.stderr b/src/test/ui/include-macros/mismatched-types.stderr index efe1f58a6f43d..d035df8e5d83a 100644 --- a/src/test/ui/include-macros/mismatched-types.stderr +++ b/src/test/ui/include-macros/mismatched-types.stderr @@ -8,6 +8,7 @@ LL | let b: &[u8] = include_str!("file.txt"); | = note: expected reference `&[u8]` found reference `&'static str` + = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) error[E0308]: mismatched types --> $DIR/mismatched-types.rs:3:19 @@ -19,6 +20,7 @@ LL | let s: &str = include_bytes!("file.txt"); | = note: expected reference `&str` found reference `&'static [u8; 0]` + = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) error: aborting due to 2 previous errors diff --git a/src/test/ui/infinite/infinite-macro-expansion.stderr b/src/test/ui/infinite/infinite-macro-expansion.stderr index ff67eea568866..c9254915d030d 100644 --- a/src/test/ui/infinite/infinite-macro-expansion.stderr +++ b/src/test/ui/infinite/infinite-macro-expansion.stderr @@ -8,6 +8,7 @@ LL | recursive!() | ------------ in this macro invocation | = help: consider adding a `#![recursion_limit="256"]` attribute to your crate (`infinite_macro_expansion`) + = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) error: aborting due to previous error diff --git a/src/test/ui/inline-asm-bad-constraint.stderr b/src/test/ui/inline-asm-bad-constraint.stderr index f38bfb2af1d91..2647e337b9d53 100644 --- a/src/test/ui/inline-asm-bad-constraint.stderr +++ b/src/test/ui/inline-asm-bad-constraint.stderr @@ -3,18 +3,24 @@ error[E0668]: malformed inline assembly | LL | asm!("" :"={rax"(rax)) | ^^^^^^^^^^^^^^^^^^^^^^ + | + = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) error[E0668]: malformed inline assembly --> $DIR/inline-asm-bad-constraint.rs:30:9 | LL | asm!("callq $0" : : "0"(foo)) | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + | + = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) error[E0668]: malformed inline assembly --> $DIR/inline-asm-bad-constraint.rs:37:9 | LL | asm!("addb $1, $0" : "={rax}"((0i32, rax))); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + | + = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) error: aborting due to 3 previous errors diff --git a/src/test/ui/internal/internal-unstable-noallow.stderr b/src/test/ui/internal/internal-unstable-noallow.stderr index 873d8f898811f..ede8e5437ffbc 100644 --- a/src/test/ui/internal/internal-unstable-noallow.stderr +++ b/src/test/ui/internal/internal-unstable-noallow.stderr @@ -5,7 +5,7 @@ LL | call_unstable_noallow!(); | ^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: add `#![feature(function)]` to the crate attributes to enable - = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z macro-backtrace for more info) + = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) error[E0658]: use of unstable library feature 'struct_field' --> $DIR/internal-unstable-noallow.rs:18:5 @@ -14,7 +14,7 @@ LL | construct_unstable_noallow!(0); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: add `#![feature(struct_field)]` to the crate attributes to enable - = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z macro-backtrace for more info) + = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) error[E0658]: use of unstable library feature 'method' --> $DIR/internal-unstable-noallow.rs:20:35 @@ -23,7 +23,7 @@ LL | |x: internal_unstable::Foo| { call_method_noallow!(x) }; | ^^^^^^^^^^^^^^^^^^^^^^^ | = help: add `#![feature(method)]` to the crate attributes to enable - = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z macro-backtrace for more info) + = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) error[E0658]: use of unstable library feature 'struct2_field' --> $DIR/internal-unstable-noallow.rs:22:35 @@ -32,7 +32,7 @@ LL | |x: internal_unstable::Bar| { access_field_noallow!(x) }; | ^^^^^^^^^^^^^^^^^^^^^^^^ | = help: add `#![feature(struct2_field)]` to the crate attributes to enable - = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z macro-backtrace for more info) + = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) error: aborting due to 4 previous errors diff --git a/src/test/ui/internal/internal-unstable.stderr b/src/test/ui/internal/internal-unstable.stderr index 2c9d14692103f..2c6bf42ae86f0 100644 --- a/src/test/ui/internal/internal-unstable.stderr +++ b/src/test/ui/internal/internal-unstable.stderr @@ -40,6 +40,7 @@ LL | bar!(internal_unstable::unstable()); | ------------------------------------ in this macro invocation | = help: add `#![feature(function)]` to the crate attributes to enable + = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) error: aborting due to 5 previous errors diff --git a/src/test/ui/issues/issue-12997-2.stderr b/src/test/ui/issues/issue-12997-2.stderr index 01f8e34883605..04464896e921e 100644 --- a/src/test/ui/issues/issue-12997-2.stderr +++ b/src/test/ui/issues/issue-12997-2.stderr @@ -3,6 +3,8 @@ error[E0308]: mismatched types | LL | fn bar(x: isize) { } | ^^^^^^^^^^^^^^^^^^^^ expected `isize`, found `&mut test::Bencher` + | + = note: this error originates in an attribute macro (in Nightly builds, run with -Z macro-backtrace for more info) error: aborting due to previous error diff --git a/src/test/ui/issues/issue-13446.stderr b/src/test/ui/issues/issue-13446.stderr index fbafae5e6344c..71d3bfe3398a6 100644 --- a/src/test/ui/issues/issue-13446.stderr +++ b/src/test/ui/issues/issue-13446.stderr @@ -6,7 +6,7 @@ LL | static VEC: [u32; 256] = vec![]; | = note: expected array `[u32; 256]` found struct `std::vec::Vec<_>` - = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z macro-backtrace for more info) + = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) error: aborting due to previous error diff --git a/src/test/ui/issues/issue-14091-2.stderr b/src/test/ui/issues/issue-14091-2.stderr index 2d6e9567d265d..499ebe977edc4 100644 --- a/src/test/ui/issues/issue-14091-2.stderr +++ b/src/test/ui/issues/issue-14091-2.stderr @@ -5,6 +5,7 @@ LL | assert!(x, x); | ^^^^^^^^^^^^^^ cannot apply unary operator `!` | = note: an implementation of `std::ops::Not` might be missing for `BytePos` + = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) error: aborting due to previous error diff --git a/src/test/ui/issues/issue-15167.stderr b/src/test/ui/issues/issue-15167.stderr index 1c488bf6fba8d..fff28b0c3afc4 100644 --- a/src/test/ui/issues/issue-15167.stderr +++ b/src/test/ui/issues/issue-15167.stderr @@ -6,6 +6,8 @@ LL | macro_rules! f { () => (n) } ... LL | println!("{}", f!()); | ---- in this macro invocation + | + = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) error[E0425]: cannot find value `n` in this scope --> $DIR/issue-15167.rs:3:25 @@ -15,6 +17,8 @@ LL | macro_rules! f { () => (n) } ... LL | println!("{}", f!()); | ---- in this macro invocation + | + = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) error[E0425]: cannot find value `n` in this scope --> $DIR/issue-15167.rs:3:25 @@ -24,6 +28,8 @@ LL | macro_rules! f { () => (n) } ... LL | println!("{}", f!()); | ---- in this macro invocation + | + = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) error[E0425]: cannot find value `n` in this scope --> $DIR/issue-15167.rs:3:25 @@ -33,6 +39,8 @@ LL | macro_rules! f { () => (n) } ... LL | println!("{}", f!()); | ---- in this macro invocation + | + = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) error: aborting due to 4 previous errors diff --git a/src/test/ui/issues/issue-16098.stderr b/src/test/ui/issues/issue-16098.stderr index a34039a6eec7d..077c720a9cdb4 100644 --- a/src/test/ui/issues/issue-16098.stderr +++ b/src/test/ui/issues/issue-16098.stderr @@ -8,6 +8,7 @@ LL | println!("Problem 1: {}", prob1!(1000)); | ------------ in this macro invocation | = help: consider adding a `#![recursion_limit="256"]` attribute to your crate (`issue_16098`) + = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) error: aborting due to previous error diff --git a/src/test/ui/issues/issue-16966.stderr b/src/test/ui/issues/issue-16966.stderr index dc715e2858b47..30932a375b1f0 100644 --- a/src/test/ui/issues/issue-16966.stderr +++ b/src/test/ui/issues/issue-16966.stderr @@ -4,7 +4,7 @@ error[E0282]: type annotations needed LL | panic!(std::default::Default::default()); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ cannot infer type for type parameter `M` declared on the function `begin_panic` | - = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z macro-backtrace for more info) + = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) error: aborting due to previous error diff --git a/src/test/ui/issues/issue-21160.stderr b/src/test/ui/issues/issue-21160.stderr index a7bb4fc512874..a24dc8a259dfb 100644 --- a/src/test/ui/issues/issue-21160.stderr +++ b/src/test/ui/issues/issue-21160.stderr @@ -8,6 +8,8 @@ LL | struct Foo(Bar); | LL | fn hash(&self, state: &mut H); | - required by this bound in `std::hash::Hash::hash` + | + = note: this error originates in a derive macro (in Nightly builds, run with -Z macro-backtrace for more info) error: aborting due to previous error diff --git a/src/test/ui/issues/issue-2150.stderr b/src/test/ui/issues/issue-2150.stderr index f3de6941cfe94..f1cb3890a72ef 100644 --- a/src/test/ui/issues/issue-2150.stderr +++ b/src/test/ui/issues/issue-2150.stderr @@ -11,7 +11,6 @@ note: the lint level is defined here | LL | #![deny(unreachable_code)] | ^^^^^^^^^^^^^^^^ - = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z macro-backtrace for more info) error: aborting due to previous error diff --git a/src/test/ui/issues/issue-25385.stderr b/src/test/ui/issues/issue-25385.stderr index ab4db7e42a4b9..2ed48356e9f56 100644 --- a/src/test/ui/issues/issue-25385.stderr +++ b/src/test/ui/issues/issue-25385.stderr @@ -6,6 +6,8 @@ LL | ($e:expr) => { $e.foo() } ... LL | foo!(a); | -------- in this macro invocation + | + = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) error[E0599]: no method named `foo` found for type `i32` in the current scope --> $DIR/issue-25385.rs:10:15 diff --git a/src/test/ui/issues/issue-25386.stderr b/src/test/ui/issues/issue-25386.stderr index eabb139b97db5..76a4a5a493f59 100644 --- a/src/test/ui/issues/issue-25386.stderr +++ b/src/test/ui/issues/issue-25386.stderr @@ -6,6 +6,8 @@ LL | (*$var.c_object).$member.is_some() ... LL | println!("{}", check_ptr_exist!(item, name)); | ---------------------------- in this macro invocation + | + = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) error[E0616]: field `name` of struct `stuff::CObj` is private --> $DIR/issue-25386.rs:19:9 @@ -15,6 +17,8 @@ LL | (*$var.c_object).$member.is_some() ... LL | println!("{}", check_ptr_exist!(item, name)); | ---------------------------- in this macro invocation + | + = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) error: aborting due to 2 previous errors diff --git a/src/test/ui/issues/issue-25793.stderr b/src/test/ui/issues/issue-25793.stderr index daea9cd8cd717..9d66ba3aae142 100644 --- a/src/test/ui/issues/issue-25793.stderr +++ b/src/test/ui/issues/issue-25793.stderr @@ -10,6 +10,8 @@ LL | r.get_size(width!(self)) | -------- ------------ in this macro invocation | | | borrow later used by call + | + = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) error: aborting due to previous error diff --git a/src/test/ui/issues/issue-26093.stderr b/src/test/ui/issues/issue-26093.stderr index c96228b518a85..204786c65c1d9 100644 --- a/src/test/ui/issues/issue-26093.stderr +++ b/src/test/ui/issues/issue-26093.stderr @@ -9,6 +9,8 @@ LL | not_a_place!(99); | | | | | cannot assign to this expression | in this macro invocation + | + = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) error[E0067]: invalid left-hand side of assignment --> $DIR/issue-26093.rs:5:16 @@ -21,6 +23,8 @@ LL | not_a_place!(99); | | | | | cannot assign to this expression | in this macro invocation + | + = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) error: aborting due to 2 previous errors diff --git a/src/test/ui/issues/issue-26094.stderr b/src/test/ui/issues/issue-26094.stderr index 36b2d3d074b0c..0b5b6d5a7504f 100644 --- a/src/test/ui/issues/issue-26094.stderr +++ b/src/test/ui/issues/issue-26094.stderr @@ -9,6 +9,8 @@ LL | fn some_function() {} ... LL | some_macro!(some_function); | --------------------------- in this macro invocation + | + = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) error: aborting due to previous error diff --git a/src/test/ui/issues/issue-27340.stderr b/src/test/ui/issues/issue-27340.stderr index 05b213b293cbf..f2c659083f63c 100644 --- a/src/test/ui/issues/issue-27340.stderr +++ b/src/test/ui/issues/issue-27340.stderr @@ -6,6 +6,8 @@ LL | #[derive(Copy, Clone)] LL | LL | struct Bar(Foo); | --- this field does not implement `Copy` + | + = note: this error originates in a derive macro (in Nightly builds, run with -Z macro-backtrace for more info) error: aborting due to previous error diff --git a/src/test/ui/issues/issue-27592.stderr b/src/test/ui/issues/issue-27592.stderr index c8649d82d7451..cf59016ded4cf 100644 --- a/src/test/ui/issues/issue-27592.stderr +++ b/src/test/ui/issues/issue-27592.stderr @@ -6,12 +6,16 @@ LL | write(|| format_args!("{}", String::from("Hello world"))); | | | | | temporary value created here | returns a value referencing data owned by the current function + | + = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) error[E0515]: cannot return reference to temporary value --> $DIR/issue-27592.rs:16:14 | LL | write(|| format_args!("{}", String::from("Hello world"))); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ returns a reference to data owned by the current function + | + = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) error: aborting due to 2 previous errors diff --git a/src/test/ui/issues/issue-29084.stderr b/src/test/ui/issues/issue-29084.stderr index 3e7ea745ce49a..bc22e9371395f 100644 --- a/src/test/ui/issues/issue-29084.stderr +++ b/src/test/ui/issues/issue-29084.stderr @@ -6,6 +6,8 @@ LL | bar(&mut $d); ... LL | foo!(0u8); | ---------- in this macro invocation + | + = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) error: aborting due to previous error diff --git a/src/test/ui/issues/issue-31011.stderr b/src/test/ui/issues/issue-31011.stderr index c7618e0835b8d..deaf490466cec 100644 --- a/src/test/ui/issues/issue-31011.stderr +++ b/src/test/ui/issues/issue-31011.stderr @@ -9,6 +9,8 @@ LL | fn wrap(context: &T) -> () LL | { LL | log!(context, "entered wrapper"); | --------------------------------- in this macro invocation + | + = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) error: aborting due to previous error diff --git a/src/test/ui/issues/issue-32655.stderr b/src/test/ui/issues/issue-32655.stderr index ca085b25c2ddf..5d5ad8aed9855 100644 --- a/src/test/ui/issues/issue-32655.stderr +++ b/src/test/ui/issues/issue-32655.stderr @@ -6,6 +6,8 @@ LL | #[derive_Clone] ... LL | foo!(); | ------- in this macro invocation + | + = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) error: cannot find attribute `derive_Clone` in this scope --> $DIR/issue-32655.rs:15:7 diff --git a/src/test/ui/issues/issue-32782.stderr b/src/test/ui/issues/issue-32782.stderr index 029826f09a2dc..3d74897aab28d 100644 --- a/src/test/ui/issues/issue-32782.stderr +++ b/src/test/ui/issues/issue-32782.stderr @@ -8,6 +8,7 @@ LL | foo!(); | ------- in this macro invocation | = help: add `#![feature(allow_internal_unstable)]` to the crate attributes to enable + = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) error: aborting due to previous error diff --git a/src/test/ui/issues/issue-32829.stderr b/src/test/ui/issues/issue-32829.stderr index 25da3f6a55065..98201b050ecbe 100644 --- a/src/test/ui/issues/issue-32829.stderr +++ b/src/test/ui/issues/issue-32829.stderr @@ -6,7 +6,7 @@ LL | static S : u64 = { { panic!("foo"); 0 } }; | = note: for more information, see https://github.com/rust-lang/rust/issues/51999 = help: add `#![feature(const_panic)]` to the crate attributes to enable - = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z macro-backtrace for more info) + = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) error: aborting due to previous error diff --git a/src/test/ui/issues/issue-32950.stderr b/src/test/ui/issues/issue-32950.stderr index 3cdf35af1d866..06a6ebd9704f1 100644 --- a/src/test/ui/issues/issue-32950.stderr +++ b/src/test/ui/issues/issue-32950.stderr @@ -9,6 +9,8 @@ error[E0412]: cannot find type `FooBar` in this scope | LL | concat_idents!(Foo, Bar) | ^^^^^^^^^^^^^^^^^^^^^^^^ not found in this scope + | + = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) error: aborting due to 2 previous errors diff --git a/src/test/ui/issues/issue-34229.stderr b/src/test/ui/issues/issue-34229.stderr index 9e1734899bdd2..cd9be6ab72c89 100644 --- a/src/test/ui/issues/issue-34229.stderr +++ b/src/test/ui/issues/issue-34229.stderr @@ -6,6 +6,7 @@ LL | #[derive(PartialEq, PartialOrd)] struct Nope(Comparable); | = help: the trait `std::cmp::PartialOrd` is not implemented for `Comparable` = note: required by `std::cmp::PartialOrd::partial_cmp` + = note: this error originates in a derive macro (in Nightly builds, run with -Z macro-backtrace for more info) error[E0277]: can't compare `Comparable` with `Comparable` --> $DIR/issue-34229.rs:2:46 @@ -15,6 +16,7 @@ LL | #[derive(PartialEq, PartialOrd)] struct Nope(Comparable); | = help: the trait `std::cmp::PartialOrd` is not implemented for `Comparable` = note: required by `std::cmp::PartialOrd::partial_cmp` + = note: this error originates in a derive macro (in Nightly builds, run with -Z macro-backtrace for more info) error[E0277]: can't compare `Comparable` with `Comparable` --> $DIR/issue-34229.rs:2:46 @@ -24,6 +26,7 @@ LL | #[derive(PartialEq, PartialOrd)] struct Nope(Comparable); | = help: the trait `std::cmp::PartialOrd` is not implemented for `Comparable` = note: required by `std::cmp::PartialOrd::partial_cmp` + = note: this error originates in a derive macro (in Nightly builds, run with -Z macro-backtrace for more info) error[E0277]: can't compare `Comparable` with `Comparable` --> $DIR/issue-34229.rs:2:46 @@ -33,6 +36,7 @@ LL | #[derive(PartialEq, PartialOrd)] struct Nope(Comparable); | = help: the trait `std::cmp::PartialOrd` is not implemented for `Comparable` = note: required by `std::cmp::PartialOrd::partial_cmp` + = note: this error originates in a derive macro (in Nightly builds, run with -Z macro-backtrace for more info) error[E0277]: can't compare `Comparable` with `Comparable` --> $DIR/issue-34229.rs:2:46 @@ -42,6 +46,7 @@ LL | #[derive(PartialEq, PartialOrd)] struct Nope(Comparable); | = help: the trait `std::cmp::PartialOrd` is not implemented for `Comparable` = note: required by `std::cmp::PartialOrd::partial_cmp` + = note: this error originates in a derive macro (in Nightly builds, run with -Z macro-backtrace for more info) error: aborting due to 5 previous errors diff --git a/src/test/ui/issues/issue-34334.stderr b/src/test/ui/issues/issue-34334.stderr index 8d20377be576a..c68b271807b99 100644 --- a/src/test/ui/issues/issue-34334.stderr +++ b/src/test/ui/issues/issue-34334.stderr @@ -33,7 +33,7 @@ LL | let sr: Vec<(u32, _, _) = vec![]; | = note: expected type `bool` found struct `std::vec::Vec<_>` - = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z macro-backtrace for more info) + = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) error[E0070]: invalid left-hand side of assignment --> $DIR/issue-34334.rs:2:29 diff --git a/src/test/ui/issues/issue-38821.stderr b/src/test/ui/issues/issue-38821.stderr index 0687fc940dec1..e355094261de1 100644 --- a/src/test/ui/issues/issue-38821.stderr +++ b/src/test/ui/issues/issue-38821.stderr @@ -5,6 +5,7 @@ LL | #[derive(Debug, Copy, Clone)] | ^^^^ the trait `NotNull` is not implemented for `::SqlType` | = note: required because of the requirements on the impl of `IntoNullable` for `::SqlType` + = note: this error originates in a derive macro (in Nightly builds, run with -Z macro-backtrace for more info) error: aborting due to previous error diff --git a/src/test/ui/issues/issue-42954.stderr b/src/test/ui/issues/issue-42954.stderr index 8c35088a1bbeb..840cceea7b0fd 100644 --- a/src/test/ui/issues/issue-42954.stderr +++ b/src/test/ui/issues/issue-42954.stderr @@ -9,6 +9,8 @@ LL | $i as u32 < 0 ... LL | is_plainly_printable!(c); | ------------------------- in this macro invocation + | + = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) error: aborting due to previous error diff --git a/src/test/ui/issues/issue-48364.stderr b/src/test/ui/issues/issue-48364.stderr index e5bb9298cd584..5ccede308a1c1 100644 --- a/src/test/ui/issues/issue-48364.stderr +++ b/src/test/ui/issues/issue-48364.stderr @@ -6,6 +6,7 @@ LL | b"".starts_with(stringify!(foo)) | = note: expected reference `&[u8]` found reference `&'static str` + = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) error: aborting due to previous error diff --git a/src/test/ui/issues/issue-48728.stderr b/src/test/ui/issues/issue-48728.stderr index 84c10d8fbc477..a0698c2079835 100644 --- a/src/test/ui/issues/issue-48728.stderr +++ b/src/test/ui/issues/issue-48728.stderr @@ -8,6 +8,7 @@ LL | impl Clone for Node<[T]> { | ------------------------------------------- first implementation here | = note: upstream crates may add a new impl of trait `std::clone::Clone` for type `[_]` in future versions + = note: this error originates in a derive macro (in Nightly builds, run with -Z macro-backtrace for more info) error: aborting due to previous error diff --git a/src/test/ui/issues/issue-50480.stderr b/src/test/ui/issues/issue-50480.stderr index 2b92664d57772..dfcac1281730b 100644 --- a/src/test/ui/issues/issue-50480.stderr +++ b/src/test/ui/issues/issue-50480.stderr @@ -29,6 +29,8 @@ LL | struct Foo(NotDefined, ::Item, Vec, String); | -------- ------ this field does not implement `Copy` | | | this field does not implement `Copy` + | + = note: this error originates in a derive macro (in Nightly builds, run with -Z macro-backtrace for more info) error: aborting due to 4 previous errors diff --git a/src/test/ui/issues/issue-51848.stderr b/src/test/ui/issues/issue-51848.stderr index 31faaab6141c5..051c4d7f42793 100644 --- a/src/test/ui/issues/issue-51848.stderr +++ b/src/test/ui/issues/issue-51848.stderr @@ -10,6 +10,7 @@ LL | macro_with_error!(); | -------------------- in this macro invocation | = note: if you intended to print `{`, you can escape it using `{{` + = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) error: invalid format string: unmatched `}` found --> $DIR/issue-51848.rs:18:15 diff --git a/src/test/ui/issues/issue-53251.stderr b/src/test/ui/issues/issue-53251.stderr index 21e41574a4683..cd5030f761987 100644 --- a/src/test/ui/issues/issue-53251.stderr +++ b/src/test/ui/issues/issue-53251.stderr @@ -6,6 +6,8 @@ LL | S::f::(); ... LL | impl_add!(a b); | --------------- in this macro invocation + | + = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) error[E0107]: wrong number of type arguments: expected 0, found 1 --> $DIR/issue-53251.rs:11:24 @@ -15,6 +17,8 @@ LL | S::f::(); ... LL | impl_add!(a b); | --------------- in this macro invocation + | + = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) error: aborting due to 2 previous errors diff --git a/src/test/ui/issues/issue-56411.stderr b/src/test/ui/issues/issue-56411.stderr index 1f38c70a11938..3ac8dc548aeb9 100644 --- a/src/test/ui/issues/issue-56411.stderr +++ b/src/test/ui/issues/issue-56411.stderr @@ -13,6 +13,7 @@ LL | import!(("issue-56411-aux.rs", issue_56411_aux)); | ------------------------------------------------- in this macro invocation | = note: `issue_56411_aux` must be defined only once in the type namespace of this module + = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) error[E0365]: `issue_56411_aux` is private, and cannot be re-exported --> $DIR/issue-56411.rs:6:21 @@ -24,6 +25,7 @@ LL | import!(("issue-56411-aux.rs", issue_56411_aux)); | ------------------------------------------------- in this macro invocation | = note: consider declaring type or module `issue_56411_aux` with `pub` + = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) error: aborting due to 2 previous errors diff --git a/src/test/ui/issues/issue-59488.stderr b/src/test/ui/issues/issue-59488.stderr index 4e5cf23afe143..2ac5577e0a0ec 100644 --- a/src/test/ui/issues/issue-59488.stderr +++ b/src/test/ui/issues/issue-59488.stderr @@ -80,7 +80,7 @@ LL | assert_eq!(Foo::Bar, i); | fn(usize) -> Foo {Foo::Bar} | = note: an implementation of `std::cmp::PartialEq` might be missing for `fn(usize) -> Foo {Foo::Bar}` - = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z macro-backtrace for more info) + = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) error[E0277]: `fn(usize) -> Foo {Foo::Bar}` doesn't implement `std::fmt::Debug` --> $DIR/issue-59488.rs:30:5 @@ -91,7 +91,7 @@ LL | assert_eq!(Foo::Bar, i); = help: the trait `std::fmt::Debug` is not implemented for `fn(usize) -> Foo {Foo::Bar}` = note: required because of the requirements on the impl of `std::fmt::Debug` for `&fn(usize) -> Foo {Foo::Bar}` = note: required by `std::fmt::Debug::fmt` - = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z macro-backtrace for more info) + = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) error[E0277]: `fn(usize) -> Foo {Foo::Bar}` doesn't implement `std::fmt::Debug` --> $DIR/issue-59488.rs:30:5 @@ -102,7 +102,7 @@ LL | assert_eq!(Foo::Bar, i); = help: the trait `std::fmt::Debug` is not implemented for `fn(usize) -> Foo {Foo::Bar}` = note: required because of the requirements on the impl of `std::fmt::Debug` for `&fn(usize) -> Foo {Foo::Bar}` = note: required by `std::fmt::Debug::fmt` - = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z macro-backtrace for more info) + = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) error: aborting due to 10 previous errors diff --git a/src/test/ui/issues/issue-6596-1.stderr b/src/test/ui/issues/issue-6596-1.stderr index 2a4ece2f2425f..4f29d8a927456 100644 --- a/src/test/ui/issues/issue-6596-1.stderr +++ b/src/test/ui/issues/issue-6596-1.stderr @@ -6,6 +6,8 @@ LL | $nonexistent ... LL | e!(foo); | -------- in this macro invocation + | + = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) error: aborting due to previous error diff --git a/src/test/ui/issues/issue-6596-2.stderr b/src/test/ui/issues/issue-6596-2.stderr index 20fbe0fab0112..4fcb0176faafd 100644 --- a/src/test/ui/issues/issue-6596-2.stderr +++ b/src/test/ui/issues/issue-6596-2.stderr @@ -6,6 +6,8 @@ LL | { $inp $nonexistent } ... LL | g!(foo); | -------- in this macro invocation + | + = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) error: aborting due to previous error diff --git a/src/test/ui/issues/issue-68091-unicode-ident-after-if.stderr b/src/test/ui/issues/issue-68091-unicode-ident-after-if.stderr index 8d1a03ac207e1..78760efd8d123 100644 --- a/src/test/ui/issues/issue-68091-unicode-ident-after-if.stderr +++ b/src/test/ui/issues/issue-68091-unicode-ident-after-if.stderr @@ -12,6 +12,8 @@ LL | $($c)ö* {} ... LL | x!(if); | ------- in this macro invocation + | + = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) error: aborting due to 2 previous errors diff --git a/src/test/ui/lifetimes/borrowck-let-suggestion.stderr b/src/test/ui/lifetimes/borrowck-let-suggestion.stderr index 10d05fd8f2b1b..2cb6e62e41294 100644 --- a/src/test/ui/lifetimes/borrowck-let-suggestion.stderr +++ b/src/test/ui/lifetimes/borrowck-let-suggestion.stderr @@ -10,7 +10,7 @@ LL | x.use_mut(); | - borrow later used here | = note: consider using a `let` binding to create a longer lived value - = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z macro-backtrace for more info) + = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) error: aborting due to previous error diff --git a/src/test/ui/lint/lint-stability2.stderr b/src/test/ui/lint/lint-stability2.stderr index bf737bcc0e347..a14bf2ec8ca97 100644 --- a/src/test/ui/lint/lint-stability2.stderr +++ b/src/test/ui/lint/lint-stability2.stderr @@ -9,7 +9,7 @@ note: the lint level is defined here | LL | #![deny(deprecated)] | ^^^^^^^^^^ - = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z macro-backtrace for more info) + = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) error: aborting due to previous error diff --git a/src/test/ui/lint/lint-stability3.stderr b/src/test/ui/lint/lint-stability3.stderr index 29b19577f440f..858ac12612c69 100644 --- a/src/test/ui/lint/lint-stability3.stderr +++ b/src/test/ui/lint/lint-stability3.stderr @@ -9,7 +9,7 @@ note: the lint level is defined here | LL | #![deny(deprecated)] | ^^^^^^^^^^ - = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z macro-backtrace for more info) + = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) error: aborting due to previous error diff --git a/src/test/ui/lint/lint-unsafe-code.stderr b/src/test/ui/lint/lint-unsafe-code.stderr index 8e56fd4139b1f..0b2b9fab3925e 100644 --- a/src/test/ui/lint/lint-unsafe-code.stderr +++ b/src/test/ui/lint/lint-unsafe-code.stderr @@ -90,6 +90,8 @@ LL | unsafe {} ... LL | unsafe_in_macro!() | ------------------ in this macro invocation + | + = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) error: aborting due to 14 previous errors diff --git a/src/test/ui/lint/lints-in-foreign-macros.stderr b/src/test/ui/lint/lints-in-foreign-macros.stderr index 0d2adb2ad0492..207d85a89c723 100644 --- a/src/test/ui/lint/lints-in-foreign-macros.stderr +++ b/src/test/ui/lint/lints-in-foreign-macros.stderr @@ -12,6 +12,7 @@ note: the lint level is defined here | LL | #![warn(unused_imports)] | ^^^^^^^^^^^^^^ + = note: this warning originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) warning: unused import: `std::string::ToString` --> $DIR/lints-in-foreign-macros.rs:16:18 diff --git a/src/test/ui/lint/test-inner-fn.stderr b/src/test/ui/lint/test-inner-fn.stderr index bf476a45f772c..a8974e1cf96b7 100644 --- a/src/test/ui/lint/test-inner-fn.stderr +++ b/src/test/ui/lint/test-inner-fn.stderr @@ -5,12 +5,15 @@ LL | #[test] | ^^^^^^^ | = note: requested on the command line with `-D unnameable-test-items` + = note: this error originates in an attribute macro (in Nightly builds, run with -Z macro-backtrace for more info) error: cannot test inner items --> $DIR/test-inner-fn.rs:13:9 | LL | #[test] | ^^^^^^^ + | + = note: this error originates in an attribute macro (in Nightly builds, run with -Z macro-backtrace for more info) error: aborting due to 2 previous errors diff --git a/src/test/ui/lint/unreachable_pub-pub_crate.stderr b/src/test/ui/lint/unreachable_pub-pub_crate.stderr index abe07b1c6496c..fd3f2dbc07670 100644 --- a/src/test/ui/lint/unreachable_pub-pub_crate.stderr +++ b/src/test/ui/lint/unreachable_pub-pub_crate.stderr @@ -132,6 +132,7 @@ LL | define_empty_struct_with_visibility!(pub, Fluorine); | in this macro invocation | = help: or consider exporting it for use by other crates + = note: this warning originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) warning: unreachable `pub` item --> $DIR/unreachable_pub-pub_crate.rs:45:9 diff --git a/src/test/ui/lint/unreachable_pub.stderr b/src/test/ui/lint/unreachable_pub.stderr index 6144d5bb6577c..ad687a4b54e6c 100644 --- a/src/test/ui/lint/unreachable_pub.stderr +++ b/src/test/ui/lint/unreachable_pub.stderr @@ -132,6 +132,7 @@ LL | define_empty_struct_with_visibility!(pub, Fluorine); | in this macro invocation | = help: or consider exporting it for use by other crates + = note: this warning originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) warning: unreachable `pub` item --> $DIR/unreachable_pub.rs:41:9 diff --git a/src/test/ui/liveness/liveness-return-last-stmt-semi.stderr b/src/test/ui/liveness/liveness-return-last-stmt-semi.stderr index 6b4de6618c51b..ae63bad841fa3 100644 --- a/src/test/ui/liveness/liveness-return-last-stmt-semi.stderr +++ b/src/test/ui/liveness/liveness-return-last-stmt-semi.stderr @@ -9,6 +9,8 @@ LL | macro_rules! test { () => { fn foo() -> i32 { 1; } } } ... LL | test!(); | -------- in this macro invocation + | + = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) error[E0308]: mismatched types --> $DIR/liveness-return-last-stmt-semi.rs:7:19 diff --git a/src/test/ui/macros/assert.stderr b/src/test/ui/macros/assert.stderr index 4bbdf01150c4c..8aa7c33185983 100644 --- a/src/test/ui/macros/assert.stderr +++ b/src/test/ui/macros/assert.stderr @@ -16,7 +16,7 @@ error: macro requires a boolean expression as an argument LL | debug_assert!(); | ^^^^^^^^^^^^^^^^ boolean expression required | - = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z macro-backtrace for more info) + = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) error: expected expression, found keyword `struct` --> $DIR/assert.rs:5:19 diff --git a/src/test/ui/macros/cfg.stderr b/src/test/ui/macros/cfg.stderr index 0fdb62922a751..bbfc5e27fec04 100644 --- a/src/test/ui/macros/cfg.stderr +++ b/src/test/ui/macros/cfg.stderr @@ -3,6 +3,8 @@ error: macro requires a cfg-pattern as an argument | LL | cfg!(); | ^^^^^^^ cfg-pattern required + | + = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) error: expected identifier, found `123` --> $DIR/cfg.rs:3:10 diff --git a/src/test/ui/macros/derive-in-eager-expansion-hang.stderr b/src/test/ui/macros/derive-in-eager-expansion-hang.stderr index 0e2fb4c8af513..5943a252579ab 100644 --- a/src/test/ui/macros/derive-in-eager-expansion-hang.stderr +++ b/src/test/ui/macros/derive-in-eager-expansion-hang.stderr @@ -12,6 +12,7 @@ LL | | } LL | format_args!(hang!()); | ------- in this macro invocation | + = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) help: you might be missing a string literal to format with | LL | format_args!("{}", hang!()); diff --git a/src/test/ui/macros/format-parse-errors.stderr b/src/test/ui/macros/format-parse-errors.stderr index 0c10fb644b0f6..66cffbfa18170 100644 --- a/src/test/ui/macros/format-parse-errors.stderr +++ b/src/test/ui/macros/format-parse-errors.stderr @@ -4,7 +4,7 @@ error: requires at least a format string argument LL | format!(); | ^^^^^^^^^^ | - = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z macro-backtrace for more info) + = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) error: expected expression, found keyword `struct` --> $DIR/format-parse-errors.rs:5:13 diff --git a/src/test/ui/macros/issue-54441.stderr b/src/test/ui/macros/issue-54441.stderr index 92d1afe1b645a..c94355f47161c 100644 --- a/src/test/ui/macros/issue-54441.stderr +++ b/src/test/ui/macros/issue-54441.stderr @@ -6,6 +6,8 @@ LL | let ... LL | m!(); | ----- in this macro invocation + | + = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) error: aborting due to previous error diff --git a/src/test/ui/macros/macro-backtrace-invalid-internals.stderr b/src/test/ui/macros/macro-backtrace-invalid-internals.stderr index 85dee9f24fe2f..2ce565936f2b5 100644 --- a/src/test/ui/macros/macro-backtrace-invalid-internals.stderr +++ b/src/test/ui/macros/macro-backtrace-invalid-internals.stderr @@ -6,6 +6,8 @@ LL | 1.fake() ... LL | fake_method_stmt!(); | -------------------- in this macro invocation + | + = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) error[E0610]: `{integer}` is a primitive type and therefore doesn't have fields --> $DIR/macro-backtrace-invalid-internals.rs:11:13 @@ -15,6 +17,8 @@ LL | 1.fake ... LL | fake_field_stmt!(); | ------------------- in this macro invocation + | + = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) error[E0610]: `{integer}` is a primitive type and therefore doesn't have fields --> $DIR/macro-backtrace-invalid-internals.rs:17:15 @@ -24,6 +28,8 @@ LL | (1).0 ... LL | fake_anon_field_stmt!(); | ------------------------ in this macro invocation + | + = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) error[E0689]: can't call method `neg` on ambiguous numeric type `{float}` --> $DIR/macro-backtrace-invalid-internals.rs:41:15 @@ -34,6 +40,7 @@ LL | 2.0.neg() LL | real_method_stmt!(); | -------------------- in this macro invocation | + = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) help: you must specify a concrete type for this numeric value, like `f32` | LL | 2.0_f32.neg() @@ -47,6 +54,8 @@ LL | 1.fake() ... LL | let _ = fake_method_expr!(); | ------------------- in this macro invocation + | + = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) error[E0610]: `{integer}` is a primitive type and therefore doesn't have fields --> $DIR/macro-backtrace-invalid-internals.rs:29:13 @@ -56,6 +65,8 @@ LL | 1.fake ... LL | let _ = fake_field_expr!(); | ------------------ in this macro invocation + | + = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) error[E0610]: `{integer}` is a primitive type and therefore doesn't have fields --> $DIR/macro-backtrace-invalid-internals.rs:35:15 @@ -65,6 +76,8 @@ LL | (1).0 ... LL | let _ = fake_anon_field_expr!(); | ----------------------- in this macro invocation + | + = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) error[E0689]: can't call method `neg` on ambiguous numeric type `{float}` --> $DIR/macro-backtrace-invalid-internals.rs:47:15 @@ -75,6 +88,7 @@ LL | 2.0.neg() LL | let _ = real_method_expr!(); | ------------------- in this macro invocation | + = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) help: you must specify a concrete type for this numeric value, like `f32` | LL | 2.0_f32.neg() diff --git a/src/test/ui/macros/macro-backtrace-nested.stderr b/src/test/ui/macros/macro-backtrace-nested.stderr index 501f525a05f77..8d3663833660c 100644 --- a/src/test/ui/macros/macro-backtrace-nested.stderr +++ b/src/test/ui/macros/macro-backtrace-nested.stderr @@ -6,6 +6,8 @@ LL | () => (fake) ... LL | 1 + call_nested_expr!(); | ------------------- in this macro invocation + | + = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) error[E0425]: cannot find value `fake` in this scope --> $DIR/macro-backtrace-nested.rs:5:12 @@ -15,6 +17,8 @@ LL | () => (fake) ... LL | call_nested_expr_sum!(); | ------------------------ in this macro invocation + | + = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) error: aborting due to 2 previous errors diff --git a/src/test/ui/macros/macro-backtrace-println.stderr b/src/test/ui/macros/macro-backtrace-println.stderr index 209ff09aea41b..b4194a833a4fa 100644 --- a/src/test/ui/macros/macro-backtrace-println.stderr +++ b/src/test/ui/macros/macro-backtrace-println.stderr @@ -6,6 +6,8 @@ LL | ($fmt:expr) => (myprint!(concat!($fmt, "\n"))); ... LL | myprintln!("{}"); | ----------------- in this macro invocation + | + = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) error: aborting due to previous error diff --git a/src/test/ui/macros/macro-context.stderr b/src/test/ui/macros/macro-context.stderr index 2a0779190f573..2e712110689f8 100644 --- a/src/test/ui/macros/macro-context.stderr +++ b/src/test/ui/macros/macro-context.stderr @@ -39,6 +39,8 @@ LL | () => ( i ; typeof ); ... LL | m!(); | ----- in this macro invocation + | + = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) error: aborting due to 4 previous errors diff --git a/src/test/ui/macros/macro-lifetime-used-with-labels.stderr b/src/test/ui/macros/macro-lifetime-used-with-labels.stderr index 05418d9bddf3f..162b337bbef13 100644 --- a/src/test/ui/macros/macro-lifetime-used-with-labels.stderr +++ b/src/test/ui/macros/macro-lifetime-used-with-labels.stderr @@ -8,4 +8,6 @@ LL | 'b: loop { | -- first declared here LL | br2!('b); | --------- in this macro invocation + | + = note: this warning originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) diff --git a/src/test/ui/macros/macro-local-data-key-priv.stderr b/src/test/ui/macros/macro-local-data-key-priv.stderr index 5519105ca9a54..c53a09aad5783 100644 --- a/src/test/ui/macros/macro-local-data-key-priv.stderr +++ b/src/test/ui/macros/macro-local-data-key-priv.stderr @@ -9,7 +9,7 @@ note: the constant `baz` is defined here | LL | thread_local!(static baz: f64 = 0.0); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z macro-backtrace for more info) + = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) error: aborting due to previous error diff --git a/src/test/ui/macros/macro-shadowing.stderr b/src/test/ui/macros/macro-shadowing.stderr index 033e12a31ae00..461e71471fb3d 100644 --- a/src/test/ui/macros/macro-shadowing.stderr +++ b/src/test/ui/macros/macro-shadowing.stderr @@ -8,6 +8,7 @@ LL | m1!(); | ------ in this macro invocation | = note: macro-expanded `#[macro_use]`s may not shadow existing macros (see RFC 1560) + = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) error[E0659]: `foo` is ambiguous (macro-expanded name vs less macro-expanded name from outer scope during import/macro resolution) --> $DIR/macro-shadowing.rs:17:1 @@ -28,6 +29,7 @@ note: `foo` could also refer to the macro defined here | LL | macro_rules! foo { () => {} } | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) error: aborting due to 2 previous errors diff --git a/src/test/ui/macros/macros-nonfatal-errors.stderr b/src/test/ui/macros/macros-nonfatal-errors.stderr index d29e6b4d46f63..1ab6b79a61ecb 100644 --- a/src/test/ui/macros/macros-nonfatal-errors.stderr +++ b/src/test/ui/macros/macros-nonfatal-errors.stderr @@ -3,6 +3,8 @@ error[E0665]: `Default` cannot be derived for enums, only structs | LL | #[derive(Default)] | ^^^^^^^ + | + = note: this error originates in a derive macro (in Nightly builds, run with -Z macro-backtrace for more info) error: inline assembly must be a string literal --> $DIR/macros-nonfatal-errors.rs:13:10 @@ -68,6 +70,8 @@ error: couldn't read $DIR/i'd be quite surprised if a file with this name existe | LL | include_str!("i'd be quite surprised if a file with this name existed"); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + | + = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) error: argument must be a string literal --> $DIR/macros-nonfatal-errors.rs:28:20 @@ -80,6 +84,8 @@ error: couldn't read $DIR/i'd be quite surprised if a file with this name existe | LL | include_bytes!("i'd be quite surprised if a file with this name existed"); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + | + = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) error: trace_macros! accepts only `true` or `false` --> $DIR/macros-nonfatal-errors.rs:31:5 diff --git a/src/test/ui/macros/must-use-in-macro-55516.stderr b/src/test/ui/macros/must-use-in-macro-55516.stderr index a8ee9cf255628..e3649e32d768d 100644 --- a/src/test/ui/macros/must-use-in-macro-55516.stderr +++ b/src/test/ui/macros/must-use-in-macro-55516.stderr @@ -6,5 +6,5 @@ LL | write!(&mut example, "{}", 42); | = note: `-W unused-must-use` implied by `-W unused` = note: this `Result` may be an `Err` variant, which should be handled - = note: this warning originates in a macro outside of the current crate (in Nightly builds, run with -Z macro-backtrace for more info) + = note: this warning originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) diff --git a/src/test/ui/macros/nonterminal-matching.stderr b/src/test/ui/macros/nonterminal-matching.stderr index 93cc97d45830b..9521322f5c281 100644 --- a/src/test/ui/macros/nonterminal-matching.stderr +++ b/src/test/ui/macros/nonterminal-matching.stderr @@ -9,6 +9,8 @@ LL | n!(a $nt_item b); ... LL | complex_nonterminal!(enum E {}); | -------------------------------- in this macro invocation + | + = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) error: aborting due to previous error diff --git a/src/test/ui/macros/restricted-shadowing-legacy.stderr b/src/test/ui/macros/restricted-shadowing-legacy.stderr index 8378286bdadf5..662266013d04a 100644 --- a/src/test/ui/macros/restricted-shadowing-legacy.stderr +++ b/src/test/ui/macros/restricted-shadowing-legacy.stderr @@ -23,6 +23,7 @@ LL | macro_rules! m { () => {} } ... LL | include!(); | ----------- in this macro invocation + = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) error[E0659]: `m` is ambiguous (macro-expanded name vs less macro-expanded name from outer scope during import/macro resolution) --> $DIR/restricted-shadowing-legacy.rs:139:42 @@ -49,6 +50,7 @@ LL | macro_rules! m { () => {} } ... LL | include!(); | ----------- in this macro invocation + = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) error[E0659]: `m` is ambiguous (macro-expanded name vs less macro-expanded name from outer scope during import/macro resolution) --> $DIR/restricted-shadowing-legacy.rs:148:9 @@ -75,6 +77,7 @@ LL | macro_rules! m { () => {} } ... LL | include!(); | ----------- in this macro invocation + = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) error[E0659]: `m` is ambiguous (macro-expanded name vs less macro-expanded name from outer scope during import/macro resolution) --> $DIR/restricted-shadowing-legacy.rs:164:9 @@ -101,6 +104,7 @@ LL | macro_rules! m { () => { Wrong } } ... LL | include!(); | ----------- in this macro invocation + = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) error[E0659]: `m` is ambiguous (macro-expanded name vs less macro-expanded name from outer scope during import/macro resolution) --> $DIR/restricted-shadowing-legacy.rs:180:13 @@ -127,6 +131,7 @@ LL | macro_rules! m { () => { Wrong } } ... LL | include!(); | ----------- in this macro invocation + = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) error[E0659]: `m` is ambiguous (macro-expanded name vs less macro-expanded name from outer scope during import/macro resolution) --> $DIR/restricted-shadowing-legacy.rs:218:42 @@ -153,6 +158,7 @@ LL | macro_rules! m { () => { Wrong } } ... LL | include!(); | ----------- in this macro invocation + = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) error[E0659]: `m` is ambiguous (macro-expanded name vs less macro-expanded name from outer scope during import/macro resolution) --> $DIR/restricted-shadowing-legacy.rs:232:9 @@ -179,6 +185,7 @@ LL | macro_rules! m { () => {} } ... LL | include!(); | ----------- in this macro invocation + = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) error[E0659]: `m` is ambiguous (macro-expanded name vs less macro-expanded name from outer scope during import/macro resolution) --> $DIR/restricted-shadowing-legacy.rs:262:42 @@ -205,6 +212,7 @@ LL | macro_rules! m { () => {} } ... LL | include!(); | ----------- in this macro invocation + = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) error: aborting due to 8 previous errors diff --git a/src/test/ui/macros/restricted-shadowing-modern.stderr b/src/test/ui/macros/restricted-shadowing-modern.stderr index 12075d42b9a7c..609f0b6b18aaf 100644 --- a/src/test/ui/macros/restricted-shadowing-modern.stderr +++ b/src/test/ui/macros/restricted-shadowing-modern.stderr @@ -23,6 +23,7 @@ LL | macro m() {} ... LL | include!(); | ----------- in this macro invocation + = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) error[E0659]: `m` is ambiguous (macro-expanded name vs less macro-expanded name from outer scope during import/macro resolution) --> $DIR/restricted-shadowing-modern.rs:147:33 @@ -49,6 +50,7 @@ LL | macro m() {} ... LL | include!(); | ----------- in this macro invocation + = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) error[E0659]: `m` is ambiguous (macro-expanded name vs less macro-expanded name from outer scope during import/macro resolution) --> $DIR/restricted-shadowing-modern.rs:156:13 @@ -75,6 +77,7 @@ LL | macro m() {} ... LL | include!(); | ----------- in this macro invocation + = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) error[E0659]: `m` is ambiguous (macro-expanded name vs less macro-expanded name from outer scope during import/macro resolution) --> $DIR/restricted-shadowing-modern.rs:172:13 @@ -101,6 +104,7 @@ LL | macro m() { Wrong } ... LL | include!(); | ----------- in this macro invocation + = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) error[E0659]: `m` is ambiguous (macro-expanded name vs less macro-expanded name from outer scope during import/macro resolution) --> $DIR/restricted-shadowing-modern.rs:190:17 @@ -127,6 +131,7 @@ LL | macro m() { Wrong } ... LL | include!(); | ----------- in this macro invocation + = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) error[E0659]: `m` is ambiguous (macro-expanded name vs less macro-expanded name from outer scope during import/macro resolution) --> $DIR/restricted-shadowing-modern.rs:233:33 @@ -153,6 +158,7 @@ LL | macro m() { Wrong } ... LL | include!(); | ----------- in this macro invocation + = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) error: aborting due to 6 previous errors diff --git a/src/test/ui/macros/same-sequence-span.stderr b/src/test/ui/macros/same-sequence-span.stderr index 0a7e019e59f33..65b67a9423876 100644 --- a/src/test/ui/macros/same-sequence-span.stderr +++ b/src/test/ui/macros/same-sequence-span.stderr @@ -28,6 +28,7 @@ LL | | fn main() {} ... | | = note: allowed there are: `=>`, `,` or `;` + = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) error: `$x:expr` may be followed by `=`, which is not allowed for `expr` fragments --> $DIR/same-sequence-span.rs:19:1 @@ -36,6 +37,7 @@ LL | proc_macro_sequence::make_foo!(); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ not allowed after `expr` fragments | = note: allowed there are: `=>`, `,` or `;` + = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) error: aborting due to 4 previous errors diff --git a/src/test/ui/macros/span-covering-argument-1.stderr b/src/test/ui/macros/span-covering-argument-1.stderr index 2ac881107b96a..efb8f61e4621a 100644 --- a/src/test/ui/macros/span-covering-argument-1.stderr +++ b/src/test/ui/macros/span-covering-argument-1.stderr @@ -8,6 +8,8 @@ LL | *&mut $s = 0; ... LL | bad!(foo whatever); | ------------------- in this macro invocation + | + = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) error: aborting due to previous error diff --git a/src/test/ui/macros/trace_faulty_macros.stderr b/src/test/ui/macros/trace_faulty_macros.stderr index 021c51fd726d3..a18e22e07f8bc 100644 --- a/src/test/ui/macros/trace_faulty_macros.stderr +++ b/src/test/ui/macros/trace_faulty_macros.stderr @@ -9,6 +9,8 @@ LL | my_faulty_macro!(bcd); ... LL | my_faulty_macro!(); | ------------------- in this macro invocation + | + = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) note: trace_macro --> $DIR/trace_faulty_macros.rs:33:5 @@ -30,6 +32,7 @@ LL | my_recursive_macro!(); | ---------------------- in this macro invocation | = help: consider adding a `#![recursion_limit="8"]` attribute to your crate (`trace_faulty_macros`) + = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) note: trace_macro --> $DIR/trace_faulty_macros.rs:34:5 diff --git a/src/test/ui/malformed/malformed-derive-entry.stderr b/src/test/ui/malformed/malformed-derive-entry.stderr index 1f1ee39b049e3..ddc75c905ac20 100644 --- a/src/test/ui/malformed/malformed-derive-entry.stderr +++ b/src/test/ui/malformed/malformed-derive-entry.stderr @@ -21,12 +21,16 @@ error[E0277]: the trait bound `Test1: std::clone::Clone` is not satisfied | LL | #[derive(Copy(Bad))] | ^^^^ the trait `std::clone::Clone` is not implemented for `Test1` + | + = note: this error originates in a derive macro (in Nightly builds, run with -Z macro-backtrace for more info) error[E0277]: the trait bound `Test2: std::clone::Clone` is not satisfied --> $DIR/malformed-derive-entry.rs:6:10 | LL | #[derive(Copy="bad")] | ^^^^ the trait `std::clone::Clone` is not implemented for `Test2` + | + = note: this error originates in a derive macro (in Nightly builds, run with -Z macro-backtrace for more info) error: aborting due to 5 previous errors diff --git a/src/test/ui/malformed/malformed-interpolated.stderr b/src/test/ui/malformed/malformed-interpolated.stderr index 6f6ad4508be01..d1be82cf7b7d3 100644 --- a/src/test/ui/malformed/malformed-interpolated.stderr +++ b/src/test/ui/malformed/malformed-interpolated.stderr @@ -14,6 +14,8 @@ LL | #[rustc_dummy = $expr] ... LL | check!(-0); // ERROR, see above | ----------- in this macro invocation + | + = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) error: unexpected token: `0 + 0` --> $DIR/malformed-interpolated.rs:5:25 @@ -23,6 +25,8 @@ LL | #[rustc_dummy = $expr] ... LL | check!(0 + 0); // ERROR, see above | -------------- in this macro invocation + | + = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) error: aborting due to 3 previous errors diff --git a/src/test/ui/match/match-arm-resolving-to-never.stderr b/src/test/ui/match/match-arm-resolving-to-never.stderr index a824e3565509d..686fbd0baa3ce 100644 --- a/src/test/ui/match/match-arm-resolving-to-never.stderr +++ b/src/test/ui/match/match-arm-resolving-to-never.stderr @@ -12,8 +12,6 @@ LL | | E::F => "", | | ^^ expected integer, found `&str` LL | | }; | |_____- `match` arms have incompatible types - | - = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z macro-backtrace for more info) error: aborting due to previous error diff --git a/src/test/ui/methods/method-on-ambiguous-numeric-type.stderr b/src/test/ui/methods/method-on-ambiguous-numeric-type.stderr index 277bcce6af9c5..10950834ad345 100644 --- a/src/test/ui/methods/method-on-ambiguous-numeric-type.stderr +++ b/src/test/ui/methods/method-on-ambiguous-numeric-type.stderr @@ -46,8 +46,6 @@ LL | mac!(bar); | ---------- you must specify a type for this binding, like `i32` LL | bar.pow(2); | ^^^ - | - = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z macro-backtrace for more info) error: aborting due to 5 previous errors diff --git a/src/test/ui/mismatched_types/issue-26480.stderr b/src/test/ui/mismatched_types/issue-26480.stderr index d4dcb9a39a403..69a9d03e474ba 100644 --- a/src/test/ui/mismatched_types/issue-26480.stderr +++ b/src/test/ui/mismatched_types/issue-26480.stderr @@ -7,6 +7,7 @@ LL | $arr.len() * size_of($arr[0])); LL | write!(hello); | -------------- in this macro invocation | + = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) help: you can convert an `usize` to `u64` and panic if the converted value wouldn't fit | LL | ($arr.len() * size_of($arr[0])).try_into().unwrap()); @@ -22,6 +23,7 @@ LL | cast!(2); | --------- in this macro invocation | = note: an `as` expression can only be used to convert between primitive types. Consider using the `From` trait + = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) error: aborting due to 2 previous errors diff --git a/src/test/ui/missing/missing-semicolon-warning.stderr b/src/test/ui/missing/missing-semicolon-warning.stderr index b4001aba2882c..ecaefd47de0b4 100644 --- a/src/test/ui/missing/missing-semicolon-warning.stderr +++ b/src/test/ui/missing/missing-semicolon-warning.stderr @@ -8,6 +8,7 @@ LL | fn main() { m!(0, 0; 0, 0); } | --------------- in this macro invocation | = note: this was erroneously allowed and will become a hard error in a future release + = note: this warning originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) warning: expected `;`, found `println` --> $DIR/missing-semicolon-warning.rs:7:12 @@ -19,4 +20,5 @@ LL | fn main() { m!(0, 0; 0, 0); } | --------------- in this macro invocation | = note: this was erroneously allowed and will become a hard error in a future release + = note: this warning originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) diff --git a/src/test/ui/never_type/feature-gate-never_type_fallback.stderr b/src/test/ui/never_type/feature-gate-never_type_fallback.stderr index 8f7d68737bc09..c652faafad461 100644 --- a/src/test/ui/never_type/feature-gate-never_type_fallback.stderr +++ b/src/test/ui/never_type/feature-gate-never_type_fallback.stderr @@ -8,7 +8,6 @@ LL | panic!() | -------- this returned value is of type `!` | = note: the return type of a function must have a statically known size - = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z macro-backtrace for more info) error: aborting due to previous error diff --git a/src/test/ui/never_type/never-assign-dead-code.stderr b/src/test/ui/never_type/never-assign-dead-code.stderr index ef48083d67061..6002f8e1eb75e 100644 --- a/src/test/ui/never_type/never-assign-dead-code.stderr +++ b/src/test/ui/never_type/never-assign-dead-code.stderr @@ -12,7 +12,6 @@ note: the lint level is defined here LL | #![warn(unused)] | ^^^^^^ = note: `#[warn(unreachable_code)]` implied by `#[warn(unused)]` - = note: this warning originates in a macro outside of the current crate (in Nightly builds, run with -Z macro-backtrace for more info) warning: unreachable call --> $DIR/never-assign-dead-code.rs:10:5 diff --git a/src/test/ui/on-unimplemented/no-debug.stderr b/src/test/ui/on-unimplemented/no-debug.stderr index cbb41263a83c4..4f9d428546bb1 100644 --- a/src/test/ui/on-unimplemented/no-debug.stderr +++ b/src/test/ui/on-unimplemented/no-debug.stderr @@ -7,6 +7,7 @@ LL | println!("{:?} {:?}", Foo, Bar); = help: the trait `std::fmt::Debug` is not implemented for `Foo` = note: add `#[derive(Debug)]` or manually implement `std::fmt::Debug` = note: required by `std::fmt::Debug::fmt` + = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) error[E0277]: `no_debug::Bar` doesn't implement `std::fmt::Debug` --> $DIR/no-debug.rs:10:32 @@ -16,6 +17,7 @@ LL | println!("{:?} {:?}", Foo, Bar); | = help: the trait `std::fmt::Debug` is not implemented for `no_debug::Bar` = note: required by `std::fmt::Debug::fmt` + = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) error[E0277]: `Foo` doesn't implement `std::fmt::Display` --> $DIR/no-debug.rs:11:23 @@ -26,6 +28,7 @@ LL | println!("{} {}", Foo, Bar); = help: the trait `std::fmt::Display` is not implemented for `Foo` = note: in format strings you may be able to use `{:?}` (or {:#?} for pretty-print) instead = note: required by `std::fmt::Display::fmt` + = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) error[E0277]: `no_debug::Bar` doesn't implement `std::fmt::Display` --> $DIR/no-debug.rs:11:28 @@ -36,6 +39,7 @@ LL | println!("{} {}", Foo, Bar); = help: the trait `std::fmt::Display` is not implemented for `no_debug::Bar` = note: in format strings you may be able to use `{:?}` (or {:#?} for pretty-print) instead = note: required by `std::fmt::Display::fmt` + = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) error: aborting due to 4 previous errors diff --git a/src/test/ui/out-of-order-shadowing.stderr b/src/test/ui/out-of-order-shadowing.stderr index eb93cfe774b9c..b414f9230b675 100644 --- a/src/test/ui/out-of-order-shadowing.stderr +++ b/src/test/ui/out-of-order-shadowing.stderr @@ -14,7 +14,7 @@ note: `bar` could also refer to the macro defined here | LL | macro_rules! bar { () => {} } | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z macro-backtrace for more info) + = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) error: aborting due to previous error diff --git a/src/test/ui/parser/issue-65122-mac-invoc-in-mut-patterns.stderr b/src/test/ui/parser/issue-65122-mac-invoc-in-mut-patterns.stderr index dd193d6a86ebd..40599d228b27a 100644 --- a/src/test/ui/parser/issue-65122-mac-invoc-in-mut-patterns.stderr +++ b/src/test/ui/parser/issue-65122-mac-invoc-in-mut-patterns.stderr @@ -8,6 +8,7 @@ LL | mac1! { does_not_exist!() } | --------------------------- in this macro invocation | = note: `mut` may be followed by `variable` and `variable @ pattern` + = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) error: expected identifier, found `does_not_exist!()` --> $DIR/issue-65122-mac-invoc-in-mut-patterns.rs:13:17 @@ -17,6 +18,8 @@ LL | let mut $eval = (); ... LL | mac2! { does_not_exist!() } | --------------------------- in this macro invocation + | + = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) error: `mut` must be followed by a named binding --> $DIR/issue-65122-mac-invoc-in-mut-patterns.rs:13:13 @@ -28,6 +31,7 @@ LL | mac2! { does_not_exist!() } | --------------------------- in this macro invocation | = note: `mut` may be followed by `variable` and `variable @ pattern` + = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) error: cannot find macro `does_not_exist` in this scope --> $DIR/issue-65122-mac-invoc-in-mut-patterns.rs:20:13 diff --git a/src/test/ui/parser/macro/issue-37113.stderr b/src/test/ui/parser/macro/issue-37113.stderr index 7aadc0aa4b5c1..20ee9d35ec7e1 100644 --- a/src/test/ui/parser/macro/issue-37113.stderr +++ b/src/test/ui/parser/macro/issue-37113.stderr @@ -6,6 +6,8 @@ LL | $( $t, )* ... LL | test_macro!(String,); | --------------------- in this macro invocation + | + = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) error: aborting due to previous error diff --git a/src/test/ui/parser/macro/issue-37234.stderr b/src/test/ui/parser/macro/issue-37234.stderr index 8cef5ae375853..2db0f848f75f1 100644 --- a/src/test/ui/parser/macro/issue-37234.stderr +++ b/src/test/ui/parser/macro/issue-37234.stderr @@ -6,6 +6,8 @@ LL | let x = 5 ""; ... LL | failed!(); | ---------- in this macro invocation + | + = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) error: aborting due to previous error diff --git a/src/test/ui/parser/macro/macro-incomplete-parse.stderr b/src/test/ui/parser/macro/macro-incomplete-parse.stderr index 46cccba74c0b6..c9d220b1a2743 100644 --- a/src/test/ui/parser/macro/macro-incomplete-parse.stderr +++ b/src/test/ui/parser/macro/macro-incomplete-parse.stderr @@ -17,6 +17,8 @@ LL | () => ( 1, ... LL | ignored_expr!(); | ---------------- in this macro invocation + | + = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) error: macro expansion ignores token `,` and any following --> $DIR/macro-incomplete-parse.rs:16:14 diff --git a/src/test/ui/parser/macro/pub-item-macro.stderr b/src/test/ui/parser/macro/pub-item-macro.stderr index ae981ac4cbee3..49644cf6a0e64 100644 --- a/src/test/ui/parser/macro/pub-item-macro.stderr +++ b/src/test/ui/parser/macro/pub-item-macro.stderr @@ -8,6 +8,7 @@ LL | pub_x!(); | --------- in this macro invocation | = help: try adjusting the macro to put `pub` inside the invocation + = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) error[E0603]: static `x` is private --> $DIR/pub-item-macro.rs:17:23 @@ -23,6 +24,7 @@ LL | static x: u32 = 0; ... LL | pub_x!(); | --------- in this macro invocation + = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) error: aborting due to 2 previous errors diff --git a/src/test/ui/parser/macro/trait-non-item-macros.stderr b/src/test/ui/parser/macro/trait-non-item-macros.stderr index 7647ba500e03a..5a89b5b936f5b 100644 --- a/src/test/ui/parser/macro/trait-non-item-macros.stderr +++ b/src/test/ui/parser/macro/trait-non-item-macros.stderr @@ -6,6 +6,8 @@ LL | ($a:expr) => ($a) ... LL | bah!(2); | -------- in this macro invocation + | + = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) error: aborting due to previous error diff --git a/src/test/ui/parser/mut-patterns.stderr b/src/test/ui/parser/mut-patterns.stderr index a0e290a834dfe..5f4c349d7d659 100644 --- a/src/test/ui/parser/mut-patterns.stderr +++ b/src/test/ui/parser/mut-patterns.stderr @@ -99,6 +99,8 @@ LL | let mut $p = 0; ... LL | foo!(x); | -------- in this macro invocation + | + = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) error: aborting due to 12 previous errors diff --git a/src/test/ui/parser/recover-range-pats.stderr b/src/test/ui/parser/recover-range-pats.stderr index 50bfbcec2475e..0d4db74f9f4fd 100644 --- a/src/test/ui/parser/recover-range-pats.stderr +++ b/src/test/ui/parser/recover-range-pats.stderr @@ -166,6 +166,8 @@ LL | let ...$e; ... LL | mac!(0); | -------- in this macro invocation + | + = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) error[E0586]: inclusive range with no end --> $DIR/recover-range-pats.rs:141:19 @@ -177,6 +179,7 @@ LL | mac!(0); | -------- in this macro invocation | = note: inclusive ranges must be bounded at the end (`..=b` or `a..=b`) + = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) error[E0586]: inclusive range with no end --> $DIR/recover-range-pats.rs:142:19 @@ -188,6 +191,7 @@ LL | mac!(0); | -------- in this macro invocation | = note: inclusive ranges must be bounded at the end (`..=b` or `a..=b`) + = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) error: `...` range patterns are deprecated --> $DIR/recover-range-pats.rs:42:13 @@ -251,6 +255,8 @@ LL | let $e1...$e2; ... LL | mac2!(0, 1); | ------------ in this macro invocation + | + = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) error[E0029]: only char and numeric types are allowed in range patterns --> $DIR/recover-range-pats.rs:20:12 diff --git a/src/test/ui/pattern/rest-pat-semantic-disallowed.stderr b/src/test/ui/pattern/rest-pat-semantic-disallowed.stderr index be484e3a4d417..95f6d53a9d40d 100644 --- a/src/test/ui/pattern/rest-pat-semantic-disallowed.stderr +++ b/src/test/ui/pattern/rest-pat-semantic-disallowed.stderr @@ -8,6 +8,7 @@ LL | let mk_pat!(); | --------- in this macro invocation | = note: only allowed in tuple, tuple struct, and slice patterns + = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) error: `..` patterns are not allowed here --> $DIR/rest-pat-semantic-disallowed.rs:18:9 diff --git a/src/test/ui/privacy/associated-item-privacy-inherent.stderr b/src/test/ui/privacy/associated-item-privacy-inherent.stderr index 6471a7914e103..88561568ea5a4 100644 --- a/src/test/ui/privacy/associated-item-privacy-inherent.stderr +++ b/src/test/ui/privacy/associated-item-privacy-inherent.stderr @@ -6,6 +6,8 @@ LL | let value = Pub::method; ... LL | priv_nominal::mac!(); | --------------------- in this macro invocation + | + = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) error: type `for<'r> fn(&'r priv_nominal::Pub) {priv_nominal::Pub::method}` is private --> $DIR/associated-item-privacy-inherent.rs:15:9 @@ -15,6 +17,8 @@ LL | value; ... LL | priv_nominal::mac!(); | --------------------- in this macro invocation + | + = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) error: type `for<'r> fn(&'r priv_nominal::Pub) {priv_nominal::Pub::method}` is private --> $DIR/associated-item-privacy-inherent.rs:17:13 @@ -24,6 +28,8 @@ LL | Pub.method(); ... LL | priv_nominal::mac!(); | --------------------- in this macro invocation + | + = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) error: associated constant `CONST` is private --> $DIR/associated-item-privacy-inherent.rs:19:9 @@ -33,6 +39,8 @@ LL | Pub::CONST; ... LL | priv_nominal::mac!(); | --------------------- in this macro invocation + | + = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) error: type `priv_signature::Priv` is private --> $DIR/associated-item-privacy-inherent.rs:37:21 @@ -42,6 +50,8 @@ LL | let value = Pub::method; ... LL | priv_signature::mac!(); | ----------------------- in this macro invocation + | + = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) error: type `priv_signature::Priv` is private --> $DIR/associated-item-privacy-inherent.rs:39:9 @@ -51,6 +61,8 @@ LL | value; ... LL | priv_signature::mac!(); | ----------------------- in this macro invocation + | + = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) error: type `priv_signature::Priv` is private --> $DIR/associated-item-privacy-inherent.rs:41:13 @@ -60,6 +72,8 @@ LL | Pub.method(loop {}); ... LL | priv_signature::mac!(); | ----------------------- in this macro invocation + | + = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) error: type `priv_substs::Priv` is private --> $DIR/associated-item-privacy-inherent.rs:57:21 @@ -69,6 +83,8 @@ LL | let value = Pub::method::; ... LL | priv_substs::mac!(); | -------------------- in this macro invocation + | + = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) error: type `priv_substs::Priv` is private --> $DIR/associated-item-privacy-inherent.rs:59:9 @@ -78,6 +94,8 @@ LL | value; ... LL | priv_substs::mac!(); | -------------------- in this macro invocation + | + = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) error: type `priv_substs::Priv` is private --> $DIR/associated-item-privacy-inherent.rs:61:9 @@ -87,6 +105,8 @@ LL | Pub.method::(); ... LL | priv_substs::mac!(); | -------------------- in this macro invocation + | + = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) error: type `priv_parent_substs::Priv` is private --> $DIR/associated-item-privacy-inherent.rs:80:21 @@ -96,6 +116,8 @@ LL | let value = ::method; ... LL | priv_parent_substs::mac!(); | --------------------------- in this macro invocation + | + = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) error: type `priv_parent_substs::Priv` is private --> $DIR/associated-item-privacy-inherent.rs:82:9 @@ -105,6 +127,8 @@ LL | value; ... LL | priv_parent_substs::mac!(); | --------------------------- in this macro invocation + | + = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) error: type `priv_parent_substs::Priv` is private --> $DIR/associated-item-privacy-inherent.rs:84:21 @@ -114,6 +138,8 @@ LL | let value = Pub::method; ... LL | priv_parent_substs::mac!(); | --------------------------- in this macro invocation + | + = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) error: type `priv_parent_substs::Priv` is private --> $DIR/associated-item-privacy-inherent.rs:86:9 @@ -123,6 +149,8 @@ LL | value; ... LL | priv_parent_substs::mac!(); | --------------------------- in this macro invocation + | + = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) error: type `priv_parent_substs::Priv` is private --> $DIR/associated-item-privacy-inherent.rs:88:21 @@ -132,6 +160,8 @@ LL | let value = ::static_method; ... LL | priv_parent_substs::mac!(); | --------------------------- in this macro invocation + | + = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) error: type `priv_parent_substs::Priv` is private --> $DIR/associated-item-privacy-inherent.rs:90:9 @@ -141,6 +171,8 @@ LL | value; ... LL | priv_parent_substs::mac!(); | --------------------------- in this macro invocation + | + = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) error: type `priv_parent_substs::Priv` is private --> $DIR/associated-item-privacy-inherent.rs:92:21 @@ -150,6 +182,8 @@ LL | let value = Pub::static_method; ... LL | priv_parent_substs::mac!(); | --------------------------- in this macro invocation + | + = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) error: type `priv_parent_substs::Priv` is private --> $DIR/associated-item-privacy-inherent.rs:94:9 @@ -159,6 +193,8 @@ LL | value; ... LL | priv_parent_substs::mac!(); | --------------------------- in this macro invocation + | + = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) error: type `priv_parent_substs::Priv` is private --> $DIR/associated-item-privacy-inherent.rs:96:19 @@ -168,6 +204,8 @@ LL | Pub(Priv).method(); ... LL | priv_parent_substs::mac!(); | --------------------------- in this macro invocation + | + = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) error: type `priv_parent_substs::Priv` is private --> $DIR/associated-item-privacy-inherent.rs:99:10 @@ -177,6 +215,8 @@ LL | ::CONST; ... LL | priv_parent_substs::mac!(); | --------------------------- in this macro invocation + | + = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) error: type `priv_parent_substs::Priv` is private --> $DIR/associated-item-privacy-inherent.rs:101:9 @@ -186,6 +226,8 @@ LL | Pub::CONST; ... LL | priv_parent_substs::mac!(); | --------------------------- in this macro invocation + | + = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) error: aborting due to 21 previous errors diff --git a/src/test/ui/privacy/associated-item-privacy-trait.stderr b/src/test/ui/privacy/associated-item-privacy-trait.stderr index 5cf1be82937f8..ac422e99855be 100644 --- a/src/test/ui/privacy/associated-item-privacy-trait.stderr +++ b/src/test/ui/privacy/associated-item-privacy-trait.stderr @@ -6,6 +6,8 @@ LL | let value = ::method; ... LL | priv_trait::mac!(); | ------------------- in this macro invocation + | + = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) error: type `for<'r> fn(&'r priv_trait::Pub) {::method}` is private --> $DIR/associated-item-privacy-trait.rs:19:9 @@ -15,6 +17,8 @@ LL | value; ... LL | priv_trait::mac!(); | ------------------- in this macro invocation + | + = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) error: type `for<'r> fn(&'r Self) {::method}` is private --> $DIR/associated-item-privacy-trait.rs:21:13 @@ -24,6 +28,8 @@ LL | Pub.method(); ... LL | priv_trait::mac!(); | ------------------- in this macro invocation + | + = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) error: associated constant `PrivTr::CONST` is private --> $DIR/associated-item-privacy-trait.rs:23:9 @@ -33,6 +39,8 @@ LL | ::CONST; ... LL | priv_trait::mac!(); | ------------------- in this macro invocation + | + = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) error: trait `priv_trait::PrivTr` is private --> $DIR/associated-item-privacy-trait.rs:25:13 @@ -42,6 +50,8 @@ LL | let _: ::AssocTy; ... LL | priv_trait::mac!(); | ------------------- in this macro invocation + | + = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) error: trait `priv_trait::PrivTr` is private --> $DIR/associated-item-privacy-trait.rs:25:16 @@ -51,6 +61,8 @@ LL | let _: ::AssocTy; ... LL | priv_trait::mac!(); | ------------------- in this macro invocation + | + = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) error: trait `priv_trait::PrivTr` is private --> $DIR/associated-item-privacy-trait.rs:28:34 @@ -60,6 +72,8 @@ LL | pub type InSignatureTy = ::AssocTy; ... LL | priv_trait::mac!(); | ------------------- in this macro invocation + | + = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) error: trait `priv_trait::PrivTr` is private --> $DIR/associated-item-privacy-trait.rs:30:34 @@ -69,6 +83,8 @@ LL | pub trait InSignatureTr: PrivTr {} ... LL | priv_trait::mac!(); | ------------------- in this macro invocation + | + = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) error: trait `priv_trait::PrivTr` is private --> $DIR/associated-item-privacy-trait.rs:32:14 @@ -78,6 +94,8 @@ LL | impl PrivTr for u8 {} ... LL | priv_trait::mac!(); | ------------------- in this macro invocation + | + = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) error: type `priv_signature::Priv` is private --> $DIR/associated-item-privacy-trait.rs:49:21 @@ -87,6 +105,8 @@ LL | let value = ::method; ... LL | priv_signature::mac!(); | ----------------------- in this macro invocation + | + = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) error: type `priv_signature::Priv` is private --> $DIR/associated-item-privacy-trait.rs:51:9 @@ -96,6 +116,8 @@ LL | value; ... LL | priv_signature::mac!(); | ----------------------- in this macro invocation + | + = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) error: type `priv_signature::Priv` is private --> $DIR/associated-item-privacy-trait.rs:53:13 @@ -105,6 +127,8 @@ LL | Pub.method(loop {}); ... LL | priv_signature::mac!(); | ----------------------- in this macro invocation + | + = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) error: type `priv_substs::Priv` is private --> $DIR/associated-item-privacy-trait.rs:70:21 @@ -114,6 +138,8 @@ LL | let value = ::method::; ... LL | priv_substs::mac!(); | -------------------- in this macro invocation + | + = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) error: type `priv_substs::Priv` is private --> $DIR/associated-item-privacy-trait.rs:72:9 @@ -123,6 +149,8 @@ LL | value; ... LL | priv_substs::mac!(); | -------------------- in this macro invocation + | + = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) error: type `priv_substs::Priv` is private --> $DIR/associated-item-privacy-trait.rs:74:9 @@ -132,6 +160,8 @@ LL | Pub.method::(); ... LL | priv_substs::mac!(); | -------------------- in this macro invocation + | + = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) error: type `priv_parent_substs::Priv` is private --> $DIR/associated-item-privacy-trait.rs:94:21 @@ -141,6 +171,8 @@ LL | let value = ::method; ... LL | priv_parent_substs::mac!(); | --------------------------- in this macro invocation + | + = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) error: type `priv_parent_substs::Priv` is private --> $DIR/associated-item-privacy-trait.rs:96:9 @@ -150,6 +182,8 @@ LL | value; ... LL | priv_parent_substs::mac!(); | --------------------------- in this macro invocation + | + = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) error: type `priv_parent_substs::Priv` is private --> $DIR/associated-item-privacy-trait.rs:98:21 @@ -159,6 +193,8 @@ LL | let value = >::method; ... LL | priv_parent_substs::mac!(); | --------------------------- in this macro invocation + | + = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) error: type `priv_parent_substs::Priv` is private --> $DIR/associated-item-privacy-trait.rs:100:9 @@ -168,6 +204,8 @@ LL | value; ... LL | priv_parent_substs::mac!(); | --------------------------- in this macro invocation + | + = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) error: type `priv_parent_substs::Priv` is private --> $DIR/associated-item-privacy-trait.rs:102:9 @@ -177,6 +215,8 @@ LL | Pub.method(); ... LL | priv_parent_substs::mac!(); | --------------------------- in this macro invocation + | + = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) error: type `priv_parent_substs::Priv` is private --> $DIR/associated-item-privacy-trait.rs:105:21 @@ -186,6 +226,8 @@ LL | let value = >::method; ... LL | priv_parent_substs::mac!(); | --------------------------- in this macro invocation + | + = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) error: type `priv_parent_substs::Priv` is private --> $DIR/associated-item-privacy-trait.rs:107:9 @@ -195,6 +237,8 @@ LL | value; ... LL | priv_parent_substs::mac!(); | --------------------------- in this macro invocation + | + = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) error: type `priv_parent_substs::Priv` is private --> $DIR/associated-item-privacy-trait.rs:109:9 @@ -204,6 +248,8 @@ LL | Priv.method(); ... LL | priv_parent_substs::mac!(); | --------------------------- in this macro invocation + | + = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) error: type `priv_parent_substs::Priv` is private --> $DIR/associated-item-privacy-trait.rs:112:9 @@ -213,6 +259,8 @@ LL | ::CONST; ... LL | priv_parent_substs::mac!(); | --------------------------- in this macro invocation + | + = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) error: type `priv_parent_substs::Priv` is private --> $DIR/associated-item-privacy-trait.rs:114:9 @@ -222,6 +270,8 @@ LL | >::CONST; ... LL | priv_parent_substs::mac!(); | --------------------------- in this macro invocation + | + = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) error: type `priv_parent_substs::Priv` is private --> $DIR/associated-item-privacy-trait.rs:116:9 @@ -231,6 +281,8 @@ LL | >::CONST; ... LL | priv_parent_substs::mac!(); | --------------------------- in this macro invocation + | + = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) error: type `priv_parent_substs::Priv` is private --> $DIR/associated-item-privacy-trait.rs:119:13 @@ -240,6 +292,8 @@ LL | let _: ::AssocTy; ... LL | priv_parent_substs::mac!(); | --------------------------- in this macro invocation + | + = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) error: type `priv_parent_substs::Priv` is private --> $DIR/associated-item-privacy-trait.rs:119:16 @@ -249,6 +303,8 @@ LL | let _: ::AssocTy; ... LL | priv_parent_substs::mac!(); | --------------------------- in this macro invocation + | + = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) error: type `priv_parent_substs::Priv` is private --> $DIR/associated-item-privacy-trait.rs:122:13 @@ -258,6 +314,8 @@ LL | let _: >::AssocTy; ... LL | priv_parent_substs::mac!(); | --------------------------- in this macro invocation + | + = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) error: type `priv_parent_substs::Priv` is private --> $DIR/associated-item-privacy-trait.rs:122:16 @@ -267,6 +325,8 @@ LL | let _: >::AssocTy; ... LL | priv_parent_substs::mac!(); | --------------------------- in this macro invocation + | + = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) error: type `priv_parent_substs::Priv` is private --> $DIR/associated-item-privacy-trait.rs:125:13 @@ -276,6 +336,8 @@ LL | let _: >::AssocTy; ... LL | priv_parent_substs::mac!(); | --------------------------- in this macro invocation + | + = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) error: type `priv_parent_substs::Priv` is private --> $DIR/associated-item-privacy-trait.rs:125:16 @@ -285,6 +347,8 @@ LL | let _: >::AssocTy; ... LL | priv_parent_substs::mac!(); | --------------------------- in this macro invocation + | + = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) error: type `priv_parent_substs::Priv` is private --> $DIR/associated-item-privacy-trait.rs:129:35 @@ -294,6 +358,8 @@ LL | pub type InSignatureTy1 = ::AssocTy; ... LL | priv_parent_substs::mac!(); | --------------------------- in this macro invocation + | + = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) error: type `priv_parent_substs::Priv` is private --> $DIR/associated-item-privacy-trait.rs:131:35 @@ -303,6 +369,8 @@ LL | pub type InSignatureTy2 = >::AssocTy; ... LL | priv_parent_substs::mac!(); | --------------------------- in this macro invocation + | + = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) error: type `priv_parent_substs::Priv` is private --> $DIR/associated-item-privacy-trait.rs:133:14 @@ -312,6 +380,8 @@ LL | impl PubTr for u8 {} ... LL | priv_parent_substs::mac!(); | --------------------------- in this macro invocation + | + = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) error: aborting due to 35 previous errors diff --git a/src/test/ui/privacy/associated-item-privacy-type-binding.stderr b/src/test/ui/privacy/associated-item-privacy-type-binding.stderr index 7f6886d7f9ad4..5afa286b85f27 100644 --- a/src/test/ui/privacy/associated-item-privacy-type-binding.stderr +++ b/src/test/ui/privacy/associated-item-privacy-type-binding.stderr @@ -6,6 +6,8 @@ LL | let _: Box>; ... LL | priv_trait::mac1!(); | -------------------- in this macro invocation + | + = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) error: trait `priv_trait::PrivTr` is private --> $DIR/associated-item-privacy-type-binding.rs:11:16 @@ -15,6 +17,8 @@ LL | let _: Box>; ... LL | priv_trait::mac1!(); | -------------------- in this macro invocation + | + = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) error: trait `priv_trait::PrivTr` is private --> $DIR/associated-item-privacy-type-binding.rs:14:31 @@ -24,6 +28,8 @@ LL | type InSignatureTy2 = Box>; ... LL | priv_trait::mac1!(); | -------------------- in this macro invocation + | + = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) error: trait `priv_trait::PrivTr` is private --> $DIR/associated-item-privacy-type-binding.rs:16:31 @@ -33,6 +39,8 @@ LL | trait InSignatureTr2: PubTr {} ... LL | priv_trait::mac1!(); | -------------------- in this macro invocation + | + = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) error: trait `priv_trait::PrivTr` is private --> $DIR/associated-item-privacy-type-binding.rs:20:13 @@ -42,6 +50,8 @@ LL | let _: Box>; ... LL | priv_trait::mac2!(); | -------------------- in this macro invocation + | + = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) error: trait `priv_trait::PrivTr` is private --> $DIR/associated-item-privacy-type-binding.rs:20:16 @@ -51,6 +61,8 @@ LL | let _: Box>; ... LL | priv_trait::mac2!(); | -------------------- in this macro invocation + | + = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) error: trait `priv_trait::PrivTr` is private --> $DIR/associated-item-privacy-type-binding.rs:23:31 @@ -60,6 +72,8 @@ LL | type InSignatureTy1 = Box>; ... LL | priv_trait::mac2!(); | -------------------- in this macro invocation + | + = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) error: trait `priv_trait::PrivTr` is private --> $DIR/associated-item-privacy-type-binding.rs:25:31 @@ -69,6 +83,8 @@ LL | trait InSignatureTr1: PrivTr {} ... LL | priv_trait::mac2!(); | -------------------- in this macro invocation + | + = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) error: type `priv_parent_substs::Priv` is private --> $DIR/associated-item-privacy-type-binding.rs:44:13 @@ -78,6 +94,8 @@ LL | let _: Box>; ... LL | priv_parent_substs::mac!(); | --------------------------- in this macro invocation + | + = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) error: type `priv_parent_substs::Priv` is private --> $DIR/associated-item-privacy-type-binding.rs:44:16 @@ -87,6 +105,8 @@ LL | let _: Box>; ... LL | priv_parent_substs::mac!(); | --------------------------- in this macro invocation + | + = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) error: type `priv_parent_substs::Priv` is private --> $DIR/associated-item-privacy-type-binding.rs:47:13 @@ -96,6 +116,8 @@ LL | let _: Box>; ... LL | priv_parent_substs::mac!(); | --------------------------- in this macro invocation + | + = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) error: type `priv_parent_substs::Priv` is private --> $DIR/associated-item-privacy-type-binding.rs:47:16 @@ -105,6 +127,8 @@ LL | let _: Box>; ... LL | priv_parent_substs::mac!(); | --------------------------- in this macro invocation + | + = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) error: type `priv_parent_substs::Priv` is private --> $DIR/associated-item-privacy-type-binding.rs:50:35 @@ -114,6 +138,8 @@ LL | pub type InSignatureTy1 = Box>; ... LL | priv_parent_substs::mac!(); | --------------------------- in this macro invocation + | + = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) error: type `priv_parent_substs::Priv` is private --> $DIR/associated-item-privacy-type-binding.rs:52:35 @@ -123,6 +149,8 @@ LL | pub type InSignatureTy2 = Box>; ... LL | priv_parent_substs::mac!(); | --------------------------- in this macro invocation + | + = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) error: type `priv_parent_substs::Priv` is private --> $DIR/associated-item-privacy-type-binding.rs:54:31 @@ -132,6 +160,8 @@ LL | trait InSignatureTr1: PubTrWithParam {} ... LL | priv_parent_substs::mac!(); | --------------------------- in this macro invocation + | + = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) error: type `priv_parent_substs::Priv` is private --> $DIR/associated-item-privacy-type-binding.rs:56:31 @@ -141,6 +171,8 @@ LL | trait InSignatureTr2: PubTr {} ... LL | priv_parent_substs::mac!(); | --------------------------- in this macro invocation + | + = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) error: aborting due to 16 previous errors diff --git a/src/test/ui/privacy/private-inferred-type-3.stderr b/src/test/ui/privacy/private-inferred-type-3.stderr index 4f57b17660ee5..376f1334ff806 100644 --- a/src/test/ui/privacy/private-inferred-type-3.stderr +++ b/src/test/ui/privacy/private-inferred-type-3.stderr @@ -4,7 +4,7 @@ error: type `fn() {ext::priv_fn}` is private LL | ext::m!(); | ^^^^^^^^^^ | - = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z macro-backtrace for more info) + = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) error: static `PRIV_STATIC` is private --> $DIR/private-inferred-type-3.rs:16:5 @@ -12,7 +12,7 @@ error: static `PRIV_STATIC` is private LL | ext::m!(); | ^^^^^^^^^^ | - = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z macro-backtrace for more info) + = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) error: type `ext::PrivEnum` is private --> $DIR/private-inferred-type-3.rs:16:5 @@ -20,7 +20,7 @@ error: type `ext::PrivEnum` is private LL | ext::m!(); | ^^^^^^^^^^ | - = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z macro-backtrace for more info) + = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) error: type `fn() {::method}` is private --> $DIR/private-inferred-type-3.rs:16:5 @@ -28,7 +28,7 @@ error: type `fn() {::method}` is private LL | ext::m!(); | ^^^^^^^^^^ | - = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z macro-backtrace for more info) + = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) error: type `fn(u8) -> ext::PrivTupleStruct {ext::PrivTupleStruct}` is private --> $DIR/private-inferred-type-3.rs:16:5 @@ -36,7 +36,7 @@ error: type `fn(u8) -> ext::PrivTupleStruct {ext::PrivTupleStruct}` is private LL | ext::m!(); | ^^^^^^^^^^ | - = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z macro-backtrace for more info) + = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) error: type `fn(u8) -> ext::PubTupleStruct {ext::PubTupleStruct}` is private --> $DIR/private-inferred-type-3.rs:16:5 @@ -44,7 +44,7 @@ error: type `fn(u8) -> ext::PubTupleStruct {ext::PubTupleStruct}` is private LL | ext::m!(); | ^^^^^^^^^^ | - = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z macro-backtrace for more info) + = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) error: type `for<'r> fn(&'r ext::Pub) {ext::Pub::::priv_method}` is private --> $DIR/private-inferred-type-3.rs:16:5 @@ -52,7 +52,7 @@ error: type `for<'r> fn(&'r ext::Pub) {ext::Pub::::priv_method}` is priv LL | ext::m!(); | ^^^^^^^^^^ | - = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z macro-backtrace for more info) + = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) error: aborting due to 7 previous errors diff --git a/src/test/ui/privacy/private-inferred-type.stderr b/src/test/ui/privacy/private-inferred-type.stderr index 4d40b6b7cab32..48c83c2186591 100644 --- a/src/test/ui/privacy/private-inferred-type.stderr +++ b/src/test/ui/privacy/private-inferred-type.stderr @@ -114,6 +114,8 @@ LL | priv_fn; ... LL | m::m!(); | -------- in this macro invocation + | + = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) error: type `m::PrivEnum` is private --> $DIR/private-inferred-type.rs:41:9 @@ -123,6 +125,8 @@ LL | PrivEnum::Variant; ... LL | m::m!(); | -------- in this macro invocation + | + = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) error: type `fn() {::method}` is private --> $DIR/private-inferred-type.rs:43:9 @@ -132,6 +136,8 @@ LL | ::method; ... LL | m::m!(); | -------- in this macro invocation + | + = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) error: type `fn(u8) -> m::PrivTupleStruct {m::PrivTupleStruct}` is private --> $DIR/private-inferred-type.rs:45:9 @@ -141,6 +147,8 @@ LL | PrivTupleStruct; ... LL | m::m!(); | -------- in this macro invocation + | + = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) error: type `fn(u8) -> m::PubTupleStruct {m::PubTupleStruct}` is private --> $DIR/private-inferred-type.rs:47:9 @@ -150,6 +158,8 @@ LL | PubTupleStruct; ... LL | m::m!(); | -------- in this macro invocation + | + = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) error: type `for<'r> fn(&'r m::Pub) {m::Pub::::priv_method}` is private --> $DIR/private-inferred-type.rs:49:18 @@ -159,6 +169,8 @@ LL | Pub(0u8).priv_method(); ... LL | m::m!(); | -------- in this macro invocation + | + = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) error: trait `m::Trait` is private --> $DIR/private-inferred-type.rs:118:5 diff --git a/src/test/ui/proc-macro/derive-bad.stderr b/src/test/ui/proc-macro/derive-bad.stderr index 93908150b6cfe..8667396c98989 100644 --- a/src/test/ui/proc-macro/derive-bad.stderr +++ b/src/test/ui/proc-macro/derive-bad.stderr @@ -3,6 +3,8 @@ error: expected `:`, found `}` | LL | A | ^ expected `:` + | + = note: this error originates in a derive macro (in Nightly builds, run with -Z macro-backtrace for more info) error: proc-macro derive produced unparseable tokens --> $DIR/derive-bad.rs:7:5 diff --git a/src/test/ui/proc-macro/derive-helper-shadowing.stderr b/src/test/ui/proc-macro/derive-helper-shadowing.stderr index 76434860a4956..f82f49aa77526 100644 --- a/src/test/ui/proc-macro/derive-helper-shadowing.stderr +++ b/src/test/ui/proc-macro/derive-helper-shadowing.stderr @@ -15,6 +15,8 @@ error: cannot find attribute `empty_helper` in this scope | LL | #[derive(GenHelperUse)] | ^^^^^^^^^^^^ + | + = note: this error originates in a derive macro (in Nightly builds, run with -Z macro-backtrace for more info) error: cannot find attribute `empty_helper` in this scope --> $DIR/derive-helper-shadowing.rs:14:11 @@ -24,6 +26,8 @@ LL | #[empty_helper] ... LL | gen_helper_use!(); | ------------------ in this macro invocation + | + = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) error[E0659]: `empty_helper` is ambiguous (name vs any other name during import resolution) --> $DIR/derive-helper-shadowing.rs:24:13 diff --git a/src/test/ui/proc-macro/dollar-crate.stderr b/src/test/ui/proc-macro/dollar-crate.stderr index b9d9f9842bcee..465f242580dfb 100644 --- a/src/test/ui/proc-macro/dollar-crate.stderr +++ b/src/test/ui/proc-macro/dollar-crate.stderr @@ -11,6 +11,7 @@ LL | local!(); | --------- in this macro invocation | = note: `D` must be defined only once in the type namespace of this module + = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) error[E0428]: the name `D` is defined multiple times --> $DIR/dollar-crate.rs:36:5 @@ -22,7 +23,7 @@ LL | dollar_crate_external::external!(); | previous definition of the type `D` here | = note: `D` must be defined only once in the type namespace of this module - = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z macro-backtrace for more info) + = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) error: aborting due to 2 previous errors diff --git a/src/test/ui/proc-macro/expand-to-unstable-2.stderr b/src/test/ui/proc-macro/expand-to-unstable-2.stderr index 5b6184afacdd0..ac75367d7ff3b 100644 --- a/src/test/ui/proc-macro/expand-to-unstable-2.stderr +++ b/src/test/ui/proc-macro/expand-to-unstable-2.stderr @@ -6,6 +6,7 @@ LL | #[derive(Unstable)] | = note: for more information, see https://github.com/rust-lang/rust/issues/29642 = help: add `#![feature(rustc_attrs)]` to the crate attributes to enable + = note: this error originates in a derive macro (in Nightly builds, run with -Z macro-backtrace for more info) error: aborting due to previous error diff --git a/src/test/ui/proc-macro/expand-to-unstable.stderr b/src/test/ui/proc-macro/expand-to-unstable.stderr index 6df00765866a6..fdbf80f9b33ac 100644 --- a/src/test/ui/proc-macro/expand-to-unstable.stderr +++ b/src/test/ui/proc-macro/expand-to-unstable.stderr @@ -5,6 +5,7 @@ LL | #[derive(Unstable)] | ^^^^^^^^ | = help: add `#![feature(core_intrinsics)]` to the crate attributes to enable + = note: this error originates in a derive macro (in Nightly builds, run with -Z macro-backtrace for more info) error: aborting due to previous error diff --git a/src/test/ui/proc-macro/gen-macro-rules-hygiene.stderr b/src/test/ui/proc-macro/gen-macro-rules-hygiene.stderr index ecebdfa965666..b65fc739e09cb 100644 --- a/src/test/ui/proc-macro/gen-macro-rules-hygiene.stderr +++ b/src/test/ui/proc-macro/gen-macro-rules-hygiene.stderr @@ -6,6 +6,8 @@ LL | gen_macro_rules!(); ... LL | generated!(); | ------------- in this macro invocation + | + = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) error[E0425]: cannot find value `local_use` in this scope --> $DIR/gen-macro-rules-hygiene.rs:12:1 @@ -15,6 +17,8 @@ LL | gen_macro_rules!(); ... LL | generated!(); | ------------- in this macro invocation + | + = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) error[E0425]: cannot find value `local_def` in this scope --> $DIR/gen-macro-rules-hygiene.rs:21:9 diff --git a/src/test/ui/proc-macro/generate-mod.stderr b/src/test/ui/proc-macro/generate-mod.stderr index 496bd86e9882e..d239097263428 100644 --- a/src/test/ui/proc-macro/generate-mod.stderr +++ b/src/test/ui/proc-macro/generate-mod.stderr @@ -6,6 +6,7 @@ LL | generate_mod::check!(); | = note: possible candidate is found in another module, you can import it into scope: FromOutside + = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) error[E0412]: cannot find type `Outer` in this scope --> $DIR/generate-mod.rs:9:1 @@ -15,6 +16,7 @@ LL | generate_mod::check!(); | = note: possible candidate is found in another module, you can import it into scope: Outer + = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) error[E0412]: cannot find type `FromOutside` in this scope --> $DIR/generate-mod.rs:12:1 @@ -24,6 +26,7 @@ LL | #[generate_mod::check_attr] | = note: possible candidate is found in another module, you can import it into scope: FromOutside + = note: this error originates in an attribute macro (in Nightly builds, run with -Z macro-backtrace for more info) error[E0412]: cannot find type `OuterAttr` in this scope --> $DIR/generate-mod.rs:12:1 @@ -33,6 +36,7 @@ LL | #[generate_mod::check_attr] | = note: possible candidate is found in another module, you can import it into scope: OuterAttr + = note: this error originates in an attribute macro (in Nightly builds, run with -Z macro-backtrace for more info) warning: cannot find type `FromOutside` in this scope --> $DIR/generate-mod.rs:16:10 diff --git a/src/test/ui/proc-macro/invalid-punct-ident-4.stderr b/src/test/ui/proc-macro/invalid-punct-ident-4.stderr index cf85974316abc..fe3e55b31be5d 100644 --- a/src/test/ui/proc-macro/invalid-punct-ident-4.stderr +++ b/src/test/ui/proc-macro/invalid-punct-ident-4.stderr @@ -3,6 +3,8 @@ error: unexpected closing delimiter: `)` | LL | lexer_failure!(); | ^^^^^^^^^^^^^^^^^ unexpected closing delimiter + | + = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) error: proc macro panicked --> $DIR/invalid-punct-ident-4.rs:6:1 diff --git a/src/test/ui/proc-macro/issue-38586.stderr b/src/test/ui/proc-macro/issue-38586.stderr index 2584e0c62eece..4cdca5c8e01b0 100644 --- a/src/test/ui/proc-macro/issue-38586.stderr +++ b/src/test/ui/proc-macro/issue-38586.stderr @@ -3,6 +3,8 @@ error[E0425]: cannot find value `foo` in this scope | LL | #[derive(A)] | ^ not found in this scope + | + = note: this error originates in a derive macro (in Nightly builds, run with -Z macro-backtrace for more info) error: aborting due to previous error diff --git a/src/test/ui/proc-macro/issue-50493.stderr b/src/test/ui/proc-macro/issue-50493.stderr index 56c7800102176..7997786b50bc9 100644 --- a/src/test/ui/proc-macro/issue-50493.stderr +++ b/src/test/ui/proc-macro/issue-50493.stderr @@ -9,12 +9,16 @@ error[E0616]: field `field` of struct `Restricted` is private | LL | #[derive(Derive)] | ^^^^^^ + | + = note: this error originates in a derive macro (in Nightly builds, run with -Z macro-backtrace for more info) error[E0616]: field `field` of struct `Restricted` is private --> $DIR/issue-50493.rs:6:10 | LL | #[derive(Derive)] | ^^^^^^ + | + = note: this error originates in a derive macro (in Nightly builds, run with -Z macro-backtrace for more info) error: aborting due to 3 previous errors diff --git a/src/test/ui/proc-macro/issue-59191-replace-root-with-fn.stderr b/src/test/ui/proc-macro/issue-59191-replace-root-with-fn.stderr index e0a3caef9db88..5995a4891f37d 100644 --- a/src/test/ui/proc-macro/issue-59191-replace-root-with-fn.stderr +++ b/src/test/ui/proc-macro/issue-59191-replace-root-with-fn.stderr @@ -3,6 +3,8 @@ error: expected crate top-level item to be a module after macro expansion, found | LL | #![issue_59191::no_main] | ^^^^^^^^^^^^^^^^^^^^^^^^ + | + = note: this error originates in an attribute macro (in Nightly builds, run with -Z macro-backtrace for more info) error[E0601]: `main` function not found in crate `issue_59191_replace_root_with_fn` --> $DIR/issue-59191-replace-root-with-fn.rs:5:1 diff --git a/src/test/ui/proc-macro/lints_in_proc_macros.stderr b/src/test/ui/proc-macro/lints_in_proc_macros.stderr index 2d97cd700be9f..df9d7e1efe3de 100644 --- a/src/test/ui/proc-macro/lints_in_proc_macros.stderr +++ b/src/test/ui/proc-macro/lints_in_proc_macros.stderr @@ -3,6 +3,8 @@ error[E0425]: cannot find value `foobar2` in this scope | LL | bang_proc_macro2!(); | ^^^^^^^^^^^^^^^^^^^^ help: a local variable with a similar name exists: `foobar` + | + = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) error: aborting due to previous error diff --git a/src/test/ui/proc-macro/mixed-site-span.stderr b/src/test/ui/proc-macro/mixed-site-span.stderr index b5ca6cb9b29e4..c344147ed93ca 100644 --- a/src/test/ui/proc-macro/mixed-site-span.stderr +++ b/src/test/ui/proc-macro/mixed-site-span.stderr @@ -3,12 +3,16 @@ error[E0426]: use of undeclared label `'label_use` | LL | proc_macro_rules!(); | ^^^^^^^^^^^^^^^^^^^^ undeclared label `'label_use` + | + = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) error[E0425]: cannot find value `local_use` in this scope --> $DIR/mixed-site-span.rs:15:9 | LL | proc_macro_rules!(); | ^^^^^^^^^^^^^^^^^^^^ not found in this scope + | + = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) error[E0425]: cannot find value `local_def` in this scope --> $DIR/mixed-site-span.rs:19:9 @@ -33,6 +37,7 @@ LL | | } LL | pass_dollar_crate!(); | --------------------- in this macro invocation | + = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) help: possible candidate is found in another module, you can import it into scope | LL | use ItemUse; diff --git a/src/test/ui/proc-macro/multispan.stderr b/src/test/ui/proc-macro/multispan.stderr index e7f705c7feb67..c9390a04b9e24 100644 --- a/src/test/ui/proc-macro/multispan.stderr +++ b/src/test/ui/proc-macro/multispan.stderr @@ -20,6 +20,7 @@ note: found these 'hi's | LL | hello!(hi); | ^^ + = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) error: hello to you, too! --> $DIR/auxiliary/multispan.rs:31:1 @@ -43,6 +44,7 @@ note: found these 'hi's | LL | hello!(hi hi); | ^^ ^^ + = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) error: hello to you, too! --> $DIR/auxiliary/multispan.rs:31:1 @@ -66,6 +68,7 @@ note: found these 'hi's | LL | hello!(hi hi hi); | ^^ ^^ ^^ + = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) error: hello to you, too! --> $DIR/auxiliary/multispan.rs:31:1 @@ -89,6 +92,7 @@ note: found these 'hi's | LL | hello!(hi hey hi yo hi beep beep hi hi); | ^^ ^^ ^^ ^^ ^^ + = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) error: hello to you, too! --> $DIR/auxiliary/multispan.rs:31:1 @@ -112,6 +116,7 @@ note: found these 'hi's | LL | hello!(hi there, hi how are you? hi... hi.); | ^^ ^^ ^^ ^^ + = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) error: hello to you, too! --> $DIR/auxiliary/multispan.rs:31:1 @@ -135,6 +140,7 @@ note: found these 'hi's | LL | hello!(whoah. hi di hi di ho); | ^^ ^^ + = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) error: hello to you, too! --> $DIR/auxiliary/multispan.rs:31:1 @@ -158,6 +164,7 @@ note: found these 'hi's | LL | hello!(hi good hi and good bye); | ^^ ^^ + = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) error: aborting due to 7 previous errors diff --git a/src/test/ui/proc-macro/parent-source-spans.stderr b/src/test/ui/proc-macro/parent-source-spans.stderr index 9f0fefcfe6c03..254f87751fd8e 100644 --- a/src/test/ui/proc-macro/parent-source-spans.stderr +++ b/src/test/ui/proc-macro/parent-source-spans.stderr @@ -6,6 +6,8 @@ LL | three!($a, $b); ... LL | one!("hello", "world"); | ----------------------- in this macro invocation + | + = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) error: second final: "world" --> $DIR/parent-source-spans.rs:19:16 @@ -15,6 +17,8 @@ LL | three!($a, $b); ... LL | one!("hello", "world"); | ----------------------- in this macro invocation + | + = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) error: first parent: "hello" --> $DIR/parent-source-spans.rs:13:5 @@ -24,6 +28,8 @@ LL | two!($a, $b); ... LL | one!("hello", "world"); | ----------------------- in this macro invocation + | + = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) error: second parent: "world" --> $DIR/parent-source-spans.rs:13:5 @@ -33,6 +39,8 @@ LL | two!($a, $b); ... LL | one!("hello", "world"); | ----------------------- in this macro invocation + | + = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) error: first grandparent: "hello" --> $DIR/parent-source-spans.rs:39:5 @@ -66,6 +74,8 @@ LL | three!($a, $b); ... LL | two!("yay", "rust"); | -------------------- in this macro invocation + | + = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) error: second final: "rust" --> $DIR/parent-source-spans.rs:19:16 @@ -75,6 +85,8 @@ LL | three!($a, $b); ... LL | two!("yay", "rust"); | -------------------- in this macro invocation + | + = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) error: first parent: "yay" --> $DIR/parent-source-spans.rs:45:5 @@ -137,6 +149,8 @@ LL | one!("hello", "world"); | LL | Ok(#[stable(feature = "rust1", since = "1.0.0")] T), | --------------------------------------------------- similarly named tuple variant `Ok` defined here + | + = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) error[E0425]: cannot find value `ok` in this scope --> $DIR/parent-source-spans.rs:32:5 @@ -151,6 +165,8 @@ LL | two!("yay", "rust"); | LL | Ok(#[stable(feature = "rust1", since = "1.0.0")] T), | --------------------------------------------------- similarly named tuple variant `Ok` defined here + | + = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) error[E0425]: cannot find value `ok` in this scope --> $DIR/parent-source-spans.rs:32:5 @@ -165,6 +181,8 @@ LL | three!("hip", "hop"); | LL | Ok(#[stable(feature = "rust1", since = "1.0.0")] T), | --------------------------------------------------- similarly named tuple variant `Ok` defined here + | + = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) error: aborting due to 21 previous errors diff --git a/src/test/ui/proc-macro/subspan.stderr b/src/test/ui/proc-macro/subspan.stderr index 5117dd6d32d49..c82c2dee67673 100644 --- a/src/test/ui/proc-macro/subspan.stderr +++ b/src/test/ui/proc-macro/subspan.stderr @@ -9,6 +9,7 @@ note: here | LL | subspan!("hi"); | ^^ + = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) error: found 'hi's --> $DIR/subspan.rs:14:1 @@ -21,6 +22,7 @@ note: here | LL | subspan!("hihi"); | ^^^^ + = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) error: found 'hi's --> $DIR/subspan.rs:17:1 @@ -33,6 +35,7 @@ note: here | LL | subspan!("hihihi"); | ^^^^^^ + = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) error: found 'hi's --> $DIR/subspan.rs:20:1 @@ -45,6 +48,7 @@ note: here | LL | subspan!("why I hide? hi!"); | ^^ ^^ + = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) error: found 'hi's --> $DIR/subspan.rs:21:1 @@ -57,6 +61,7 @@ note: here | LL | subspan!("hey, hi, hidy, hidy, hi hi"); | ^^ ^^ ^^ ^^ ^^ + = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) error: found 'hi's --> $DIR/subspan.rs:22:1 @@ -69,6 +74,7 @@ note: here | LL | subspan!("this is a hi, and this is another hi"); | ^^ ^^ ^^ ^^ + = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) error: found 'hi's --> $DIR/subspan.rs:23:1 @@ -81,6 +87,7 @@ note: here | LL | subspan!("how are you this evening"); | ^^ + = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) error: found 'hi's --> $DIR/subspan.rs:24:1 @@ -93,6 +100,7 @@ note: here | LL | subspan!("this is highly eradic"); | ^^ ^^ + = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) error: aborting due to 8 previous errors diff --git a/src/test/ui/proc-macro/three-equals.stderr b/src/test/ui/proc-macro/three-equals.stderr index 0698b0f475424..82c4167262fdd 100644 --- a/src/test/ui/proc-macro/three-equals.stderr +++ b/src/test/ui/proc-macro/three-equals.stderr @@ -16,6 +16,7 @@ LL | three_equals!(==); | ------------------ in this macro invocation | = help: input must be: `===` + = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) error: expected EOF, found `=`. --> $DIR/three-equals.rs:18:21 diff --git a/src/test/ui/range/range_traits-1.stderr b/src/test/ui/range/range_traits-1.stderr index f60ec23bdb0da..0e1da3d3f76fa 100644 --- a/src/test/ui/range/range_traits-1.stderr +++ b/src/test/ui/range/range_traits-1.stderr @@ -6,6 +6,7 @@ LL | a: Range, | = help: the trait `std::cmp::PartialOrd` is not implemented for `std::ops::Range` = note: required by `std::cmp::PartialOrd::partial_cmp` + = note: this error originates in a derive macro (in Nightly builds, run with -Z macro-backtrace for more info) error[E0277]: can't compare `std::ops::RangeTo` with `std::ops::RangeTo` --> $DIR/range_traits-1.rs:12:5 @@ -15,6 +16,7 @@ LL | b: RangeTo, | = help: the trait `std::cmp::PartialOrd` is not implemented for `std::ops::RangeTo` = note: required by `std::cmp::PartialOrd::partial_cmp` + = note: this error originates in a derive macro (in Nightly builds, run with -Z macro-backtrace for more info) error[E0277]: can't compare `std::ops::RangeFrom` with `std::ops::RangeFrom` --> $DIR/range_traits-1.rs:19:5 @@ -24,6 +26,7 @@ LL | c: RangeFrom, | = help: the trait `std::cmp::PartialOrd` is not implemented for `std::ops::RangeFrom` = note: required by `std::cmp::PartialOrd::partial_cmp` + = note: this error originates in a derive macro (in Nightly builds, run with -Z macro-backtrace for more info) error[E0277]: can't compare `std::ops::RangeFull` with `std::ops::RangeFull` --> $DIR/range_traits-1.rs:26:5 @@ -33,6 +36,7 @@ LL | d: RangeFull, | = help: the trait `std::cmp::PartialOrd` is not implemented for `std::ops::RangeFull` = note: required by `std::cmp::PartialOrd::partial_cmp` + = note: this error originates in a derive macro (in Nightly builds, run with -Z macro-backtrace for more info) error[E0277]: can't compare `std::ops::RangeInclusive` with `std::ops::RangeInclusive` --> $DIR/range_traits-1.rs:33:5 @@ -42,6 +46,7 @@ LL | e: RangeInclusive, | = help: the trait `std::cmp::PartialOrd` is not implemented for `std::ops::RangeInclusive` = note: required by `std::cmp::PartialOrd::partial_cmp` + = note: this error originates in a derive macro (in Nightly builds, run with -Z macro-backtrace for more info) error[E0277]: can't compare `std::ops::RangeToInclusive` with `std::ops::RangeToInclusive` --> $DIR/range_traits-1.rs:40:5 @@ -51,6 +56,7 @@ LL | f: RangeToInclusive, | = help: the trait `std::cmp::PartialOrd` is not implemented for `std::ops::RangeToInclusive` = note: required by `std::cmp::PartialOrd::partial_cmp` + = note: this error originates in a derive macro (in Nightly builds, run with -Z macro-backtrace for more info) error[E0277]: can't compare `std::ops::Range` with `std::ops::Range` --> $DIR/range_traits-1.rs:5:5 @@ -60,6 +66,7 @@ LL | a: Range, | = help: the trait `std::cmp::PartialOrd` is not implemented for `std::ops::Range` = note: required by `std::cmp::PartialOrd::partial_cmp` + = note: this error originates in a derive macro (in Nightly builds, run with -Z macro-backtrace for more info) error[E0277]: can't compare `std::ops::RangeTo` with `std::ops::RangeTo` --> $DIR/range_traits-1.rs:12:5 @@ -69,6 +76,7 @@ LL | b: RangeTo, | = help: the trait `std::cmp::PartialOrd` is not implemented for `std::ops::RangeTo` = note: required by `std::cmp::PartialOrd::partial_cmp` + = note: this error originates in a derive macro (in Nightly builds, run with -Z macro-backtrace for more info) error[E0277]: can't compare `std::ops::RangeFrom` with `std::ops::RangeFrom` --> $DIR/range_traits-1.rs:19:5 @@ -78,6 +86,7 @@ LL | c: RangeFrom, | = help: the trait `std::cmp::PartialOrd` is not implemented for `std::ops::RangeFrom` = note: required by `std::cmp::PartialOrd::partial_cmp` + = note: this error originates in a derive macro (in Nightly builds, run with -Z macro-backtrace for more info) error[E0277]: can't compare `std::ops::RangeFull` with `std::ops::RangeFull` --> $DIR/range_traits-1.rs:26:5 @@ -87,6 +96,7 @@ LL | d: RangeFull, | = help: the trait `std::cmp::PartialOrd` is not implemented for `std::ops::RangeFull` = note: required by `std::cmp::PartialOrd::partial_cmp` + = note: this error originates in a derive macro (in Nightly builds, run with -Z macro-backtrace for more info) error[E0277]: can't compare `std::ops::RangeInclusive` with `std::ops::RangeInclusive` --> $DIR/range_traits-1.rs:33:5 @@ -96,6 +106,7 @@ LL | e: RangeInclusive, | = help: the trait `std::cmp::PartialOrd` is not implemented for `std::ops::RangeInclusive` = note: required by `std::cmp::PartialOrd::partial_cmp` + = note: this error originates in a derive macro (in Nightly builds, run with -Z macro-backtrace for more info) error[E0277]: can't compare `std::ops::RangeToInclusive` with `std::ops::RangeToInclusive` --> $DIR/range_traits-1.rs:40:5 @@ -105,6 +116,7 @@ LL | f: RangeToInclusive, | = help: the trait `std::cmp::PartialOrd` is not implemented for `std::ops::RangeToInclusive` = note: required by `std::cmp::PartialOrd::partial_cmp` + = note: this error originates in a derive macro (in Nightly builds, run with -Z macro-backtrace for more info) error[E0277]: can't compare `std::ops::Range` with `std::ops::Range` --> $DIR/range_traits-1.rs:5:5 @@ -114,6 +126,7 @@ LL | a: Range, | = help: the trait `std::cmp::PartialOrd` is not implemented for `std::ops::Range` = note: required by `std::cmp::PartialOrd::partial_cmp` + = note: this error originates in a derive macro (in Nightly builds, run with -Z macro-backtrace for more info) error[E0277]: can't compare `std::ops::RangeTo` with `std::ops::RangeTo` --> $DIR/range_traits-1.rs:12:5 @@ -123,6 +136,7 @@ LL | b: RangeTo, | = help: the trait `std::cmp::PartialOrd` is not implemented for `std::ops::RangeTo` = note: required by `std::cmp::PartialOrd::partial_cmp` + = note: this error originates in a derive macro (in Nightly builds, run with -Z macro-backtrace for more info) error[E0277]: can't compare `std::ops::RangeFrom` with `std::ops::RangeFrom` --> $DIR/range_traits-1.rs:19:5 @@ -132,6 +146,7 @@ LL | c: RangeFrom, | = help: the trait `std::cmp::PartialOrd` is not implemented for `std::ops::RangeFrom` = note: required by `std::cmp::PartialOrd::partial_cmp` + = note: this error originates in a derive macro (in Nightly builds, run with -Z macro-backtrace for more info) error[E0277]: can't compare `std::ops::RangeFull` with `std::ops::RangeFull` --> $DIR/range_traits-1.rs:26:5 @@ -141,6 +156,7 @@ LL | d: RangeFull, | = help: the trait `std::cmp::PartialOrd` is not implemented for `std::ops::RangeFull` = note: required by `std::cmp::PartialOrd::partial_cmp` + = note: this error originates in a derive macro (in Nightly builds, run with -Z macro-backtrace for more info) error[E0277]: can't compare `std::ops::RangeInclusive` with `std::ops::RangeInclusive` --> $DIR/range_traits-1.rs:33:5 @@ -150,6 +166,7 @@ LL | e: RangeInclusive, | = help: the trait `std::cmp::PartialOrd` is not implemented for `std::ops::RangeInclusive` = note: required by `std::cmp::PartialOrd::partial_cmp` + = note: this error originates in a derive macro (in Nightly builds, run with -Z macro-backtrace for more info) error[E0277]: can't compare `std::ops::RangeToInclusive` with `std::ops::RangeToInclusive` --> $DIR/range_traits-1.rs:40:5 @@ -159,6 +176,7 @@ LL | f: RangeToInclusive, | = help: the trait `std::cmp::PartialOrd` is not implemented for `std::ops::RangeToInclusive` = note: required by `std::cmp::PartialOrd::partial_cmp` + = note: this error originates in a derive macro (in Nightly builds, run with -Z macro-backtrace for more info) error[E0277]: can't compare `std::ops::Range` with `std::ops::Range` --> $DIR/range_traits-1.rs:5:5 @@ -168,6 +186,7 @@ LL | a: Range, | = help: the trait `std::cmp::PartialOrd` is not implemented for `std::ops::Range` = note: required by `std::cmp::PartialOrd::partial_cmp` + = note: this error originates in a derive macro (in Nightly builds, run with -Z macro-backtrace for more info) error[E0277]: can't compare `std::ops::RangeTo` with `std::ops::RangeTo` --> $DIR/range_traits-1.rs:12:5 @@ -177,6 +196,7 @@ LL | b: RangeTo, | = help: the trait `std::cmp::PartialOrd` is not implemented for `std::ops::RangeTo` = note: required by `std::cmp::PartialOrd::partial_cmp` + = note: this error originates in a derive macro (in Nightly builds, run with -Z macro-backtrace for more info) error[E0277]: can't compare `std::ops::RangeFrom` with `std::ops::RangeFrom` --> $DIR/range_traits-1.rs:19:5 @@ -186,6 +206,7 @@ LL | c: RangeFrom, | = help: the trait `std::cmp::PartialOrd` is not implemented for `std::ops::RangeFrom` = note: required by `std::cmp::PartialOrd::partial_cmp` + = note: this error originates in a derive macro (in Nightly builds, run with -Z macro-backtrace for more info) error[E0277]: can't compare `std::ops::RangeFull` with `std::ops::RangeFull` --> $DIR/range_traits-1.rs:26:5 @@ -195,6 +216,7 @@ LL | d: RangeFull, | = help: the trait `std::cmp::PartialOrd` is not implemented for `std::ops::RangeFull` = note: required by `std::cmp::PartialOrd::partial_cmp` + = note: this error originates in a derive macro (in Nightly builds, run with -Z macro-backtrace for more info) error[E0277]: can't compare `std::ops::RangeInclusive` with `std::ops::RangeInclusive` --> $DIR/range_traits-1.rs:33:5 @@ -204,6 +226,7 @@ LL | e: RangeInclusive, | = help: the trait `std::cmp::PartialOrd` is not implemented for `std::ops::RangeInclusive` = note: required by `std::cmp::PartialOrd::partial_cmp` + = note: this error originates in a derive macro (in Nightly builds, run with -Z macro-backtrace for more info) error[E0277]: can't compare `std::ops::RangeToInclusive` with `std::ops::RangeToInclusive` --> $DIR/range_traits-1.rs:40:5 @@ -213,6 +236,7 @@ LL | f: RangeToInclusive, | = help: the trait `std::cmp::PartialOrd` is not implemented for `std::ops::RangeToInclusive` = note: required by `std::cmp::PartialOrd::partial_cmp` + = note: this error originates in a derive macro (in Nightly builds, run with -Z macro-backtrace for more info) error[E0277]: can't compare `std::ops::Range` with `std::ops::Range` --> $DIR/range_traits-1.rs:5:5 @@ -222,6 +246,7 @@ LL | a: Range, | = help: the trait `std::cmp::PartialOrd` is not implemented for `std::ops::Range` = note: required by `std::cmp::PartialOrd::partial_cmp` + = note: this error originates in a derive macro (in Nightly builds, run with -Z macro-backtrace for more info) error[E0277]: can't compare `std::ops::RangeTo` with `std::ops::RangeTo` --> $DIR/range_traits-1.rs:12:5 @@ -231,6 +256,7 @@ LL | b: RangeTo, | = help: the trait `std::cmp::PartialOrd` is not implemented for `std::ops::RangeTo` = note: required by `std::cmp::PartialOrd::partial_cmp` + = note: this error originates in a derive macro (in Nightly builds, run with -Z macro-backtrace for more info) error[E0277]: can't compare `std::ops::RangeFrom` with `std::ops::RangeFrom` --> $DIR/range_traits-1.rs:19:5 @@ -240,6 +266,7 @@ LL | c: RangeFrom, | = help: the trait `std::cmp::PartialOrd` is not implemented for `std::ops::RangeFrom` = note: required by `std::cmp::PartialOrd::partial_cmp` + = note: this error originates in a derive macro (in Nightly builds, run with -Z macro-backtrace for more info) error[E0277]: can't compare `std::ops::RangeFull` with `std::ops::RangeFull` --> $DIR/range_traits-1.rs:26:5 @@ -249,6 +276,7 @@ LL | d: RangeFull, | = help: the trait `std::cmp::PartialOrd` is not implemented for `std::ops::RangeFull` = note: required by `std::cmp::PartialOrd::partial_cmp` + = note: this error originates in a derive macro (in Nightly builds, run with -Z macro-backtrace for more info) error[E0277]: can't compare `std::ops::RangeInclusive` with `std::ops::RangeInclusive` --> $DIR/range_traits-1.rs:33:5 @@ -258,6 +286,7 @@ LL | e: RangeInclusive, | = help: the trait `std::cmp::PartialOrd` is not implemented for `std::ops::RangeInclusive` = note: required by `std::cmp::PartialOrd::partial_cmp` + = note: this error originates in a derive macro (in Nightly builds, run with -Z macro-backtrace for more info) error[E0277]: can't compare `std::ops::RangeToInclusive` with `std::ops::RangeToInclusive` --> $DIR/range_traits-1.rs:40:5 @@ -267,6 +296,7 @@ LL | f: RangeToInclusive, | = help: the trait `std::cmp::PartialOrd` is not implemented for `std::ops::RangeToInclusive` = note: required by `std::cmp::PartialOrd::partial_cmp` + = note: this error originates in a derive macro (in Nightly builds, run with -Z macro-backtrace for more info) error[E0277]: the trait bound `std::ops::Range: std::cmp::Ord` is not satisfied --> $DIR/range_traits-1.rs:5:5 @@ -275,6 +305,7 @@ LL | a: Range, | ^^^^^^^^^^^^^^^ the trait `std::cmp::Ord` is not implemented for `std::ops::Range` | = note: required by `std::cmp::Ord::cmp` + = note: this error originates in a derive macro (in Nightly builds, run with -Z macro-backtrace for more info) error[E0277]: the trait bound `std::ops::RangeTo: std::cmp::Ord` is not satisfied --> $DIR/range_traits-1.rs:12:5 @@ -283,6 +314,7 @@ LL | b: RangeTo, | ^^^^^^^^^^^^^^^^^ the trait `std::cmp::Ord` is not implemented for `std::ops::RangeTo` | = note: required by `std::cmp::Ord::cmp` + = note: this error originates in a derive macro (in Nightly builds, run with -Z macro-backtrace for more info) error[E0277]: the trait bound `std::ops::RangeFrom: std::cmp::Ord` is not satisfied --> $DIR/range_traits-1.rs:19:5 @@ -291,6 +323,7 @@ LL | c: RangeFrom, | ^^^^^^^^^^^^^^^^^^^ the trait `std::cmp::Ord` is not implemented for `std::ops::RangeFrom` | = note: required by `std::cmp::Ord::cmp` + = note: this error originates in a derive macro (in Nightly builds, run with -Z macro-backtrace for more info) error[E0277]: the trait bound `std::ops::RangeFull: std::cmp::Ord` is not satisfied --> $DIR/range_traits-1.rs:26:5 @@ -299,6 +332,7 @@ LL | d: RangeFull, | ^^^^^^^^^^^^ the trait `std::cmp::Ord` is not implemented for `std::ops::RangeFull` | = note: required by `std::cmp::Ord::cmp` + = note: this error originates in a derive macro (in Nightly builds, run with -Z macro-backtrace for more info) error[E0277]: the trait bound `std::ops::RangeInclusive: std::cmp::Ord` is not satisfied --> $DIR/range_traits-1.rs:33:5 @@ -307,6 +341,7 @@ LL | e: RangeInclusive, | ^^^^^^^^^^^^^^^^^^^^^^^^ the trait `std::cmp::Ord` is not implemented for `std::ops::RangeInclusive` | = note: required by `std::cmp::Ord::cmp` + = note: this error originates in a derive macro (in Nightly builds, run with -Z macro-backtrace for more info) error[E0277]: the trait bound `std::ops::RangeToInclusive: std::cmp::Ord` is not satisfied --> $DIR/range_traits-1.rs:40:5 @@ -315,6 +350,7 @@ LL | f: RangeToInclusive, | ^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `std::cmp::Ord` is not implemented for `std::ops::RangeToInclusive` | = note: required by `std::cmp::Ord::cmp` + = note: this error originates in a derive macro (in Nightly builds, run with -Z macro-backtrace for more info) error: aborting due to 36 previous errors diff --git a/src/test/ui/range/range_traits-2.stderr b/src/test/ui/range/range_traits-2.stderr index 598a0b3ed0374..8a9d15f09996b 100644 --- a/src/test/ui/range/range_traits-2.stderr +++ b/src/test/ui/range/range_traits-2.stderr @@ -5,6 +5,8 @@ LL | #[derive(Copy, Clone)] | ^^^^ LL | struct R(Range); | ------------ this field does not implement `Copy` + | + = note: this error originates in a derive macro (in Nightly builds, run with -Z macro-backtrace for more info) error: aborting due to previous error diff --git a/src/test/ui/range/range_traits-3.stderr b/src/test/ui/range/range_traits-3.stderr index e2713a2bd5ed8..14fda58e1f813 100644 --- a/src/test/ui/range/range_traits-3.stderr +++ b/src/test/ui/range/range_traits-3.stderr @@ -5,6 +5,8 @@ LL | #[derive(Copy, Clone)] | ^^^^ LL | struct R(RangeFrom); | ---------------- this field does not implement `Copy` + | + = note: this error originates in a derive macro (in Nightly builds, run with -Z macro-backtrace for more info) error: aborting due to previous error diff --git a/src/test/ui/range/range_traits-6.stderr b/src/test/ui/range/range_traits-6.stderr index 226d72ce0262e..693600cdce4d1 100644 --- a/src/test/ui/range/range_traits-6.stderr +++ b/src/test/ui/range/range_traits-6.stderr @@ -5,6 +5,8 @@ LL | #[derive(Copy, Clone)] | ^^^^ LL | struct R(RangeInclusive); | --------------------- this field does not implement `Copy` + | + = note: this error originates in a derive macro (in Nightly builds, run with -Z macro-backtrace for more info) error: aborting due to previous error diff --git a/src/test/ui/reachable/expr_again.stderr b/src/test/ui/reachable/expr_again.stderr index 805c965a87903..130fd8535e0ff 100644 --- a/src/test/ui/reachable/expr_again.stderr +++ b/src/test/ui/reachable/expr_again.stderr @@ -11,7 +11,7 @@ note: the lint level is defined here | LL | #![deny(unreachable_code)] | ^^^^^^^^^^^^^^^^ - = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z macro-backtrace for more info) + = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) error: aborting due to previous error diff --git a/src/test/ui/reachable/expr_block.stderr b/src/test/ui/reachable/expr_block.stderr index bd0c926279632..154734b0f696c 100644 --- a/src/test/ui/reachable/expr_block.stderr +++ b/src/test/ui/reachable/expr_block.stderr @@ -20,7 +20,7 @@ LL | return; LL | println!("foo"); | ^^^^^^^^^^^^^^^^ unreachable statement | - = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z macro-backtrace for more info) + = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) error: aborting due to 2 previous errors diff --git a/src/test/ui/reachable/expr_if.stderr b/src/test/ui/reachable/expr_if.stderr index bfb4675df1186..850570d05646d 100644 --- a/src/test/ui/reachable/expr_if.stderr +++ b/src/test/ui/reachable/expr_if.stderr @@ -24,7 +24,7 @@ LL | return; LL | println!("But I am."); | ^^^^^^^^^^^^^^^^^^^^^^ unreachable statement | - = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z macro-backtrace for more info) + = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) error: aborting due to 2 previous errors diff --git a/src/test/ui/reachable/expr_loop.stderr b/src/test/ui/reachable/expr_loop.stderr index dd294ddccd970..fe7d7782edf55 100644 --- a/src/test/ui/reachable/expr_loop.stderr +++ b/src/test/ui/reachable/expr_loop.stderr @@ -11,7 +11,7 @@ note: the lint level is defined here | LL | #![deny(unreachable_code)] | ^^^^^^^^^^^^^^^^ - = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z macro-backtrace for more info) + = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) error: unreachable statement --> $DIR/expr_loop.rs:21:5 @@ -21,7 +21,7 @@ LL | loop { return; } LL | println!("I am dead."); | ^^^^^^^^^^^^^^^^^^^^^^^ unreachable statement | - = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z macro-backtrace for more info) + = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) error: unreachable statement --> $DIR/expr_loop.rs:32:5 @@ -31,7 +31,7 @@ LL | loop { 'middle: loop { loop { break 'middle; } } } LL | println!("I am dead."); | ^^^^^^^^^^^^^^^^^^^^^^^ unreachable statement | - = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z macro-backtrace for more info) + = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) error: aborting due to 3 previous errors diff --git a/src/test/ui/reachable/expr_match.stderr b/src/test/ui/reachable/expr_match.stderr index 796cbba12a2b1..a1c396e0c6116 100644 --- a/src/test/ui/reachable/expr_match.stderr +++ b/src/test/ui/reachable/expr_match.stderr @@ -11,7 +11,7 @@ note: the lint level is defined here | LL | #![deny(unreachable_code)] | ^^^^^^^^^^^^^^^^ - = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z macro-backtrace for more info) + = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) error: unreachable statement --> $DIR/expr_match.rs:19:5 @@ -21,7 +21,7 @@ LL | match () { () if false => return, () => return } LL | println!("I am dead"); | ^^^^^^^^^^^^^^^^^^^^^^ unreachable statement | - = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z macro-backtrace for more info) + = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) error: aborting due to 2 previous errors diff --git a/src/test/ui/regions/regions-var-type-out-of-scope.stderr b/src/test/ui/regions/regions-var-type-out-of-scope.stderr index b15ed910a4feb..d95717676855e 100644 --- a/src/test/ui/regions/regions-var-type-out-of-scope.stderr +++ b/src/test/ui/regions/regions-var-type-out-of-scope.stderr @@ -9,7 +9,6 @@ LL | assert_eq!(*x, 3); | ------------------ borrow later used here | = note: consider using a `let` binding to create a longer lived value - = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z macro-backtrace for more info) error: aborting due to previous error diff --git a/src/test/ui/rfc-1937-termination-trait/termination-trait-test-wrong-type.stderr b/src/test/ui/rfc-1937-termination-trait/termination-trait-test-wrong-type.stderr index ed4f34b527fcb..d4bd760770d5f 100644 --- a/src/test/ui/rfc-1937-termination-trait/termination-trait-test-wrong-type.stderr +++ b/src/test/ui/rfc-1937-termination-trait/termination-trait-test-wrong-type.stderr @@ -12,6 +12,7 @@ LL | pub fn assert_test_result(result: T) { | ----------- required by this bound in `test::assert_test_result` | = help: the trait `std::process::Termination` is not implemented for `std::result::Result` + = note: this error originates in an attribute macro (in Nightly builds, run with -Z macro-backtrace for more info) error: aborting due to previous error diff --git a/src/test/ui/rfc-2361-dbg-macro/dbg-macro-move-semantics.stderr b/src/test/ui/rfc-2361-dbg-macro/dbg-macro-move-semantics.stderr index 58ba38d1304fa..5611b5f4ece5f 100644 --- a/src/test/ui/rfc-2361-dbg-macro/dbg-macro-move-semantics.stderr +++ b/src/test/ui/rfc-2361-dbg-macro/dbg-macro-move-semantics.stderr @@ -7,8 +7,6 @@ LL | let _ = dbg!(a); | ------- value moved here LL | let _ = dbg!(a); | ^ value used here after move - | - = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z macro-backtrace for more info) error: aborting due to previous error diff --git a/src/test/ui/rfc-2361-dbg-macro/dbg-macro-requires-debug.stderr b/src/test/ui/rfc-2361-dbg-macro/dbg-macro-requires-debug.stderr index 460561997e163..799a05bf7e898 100644 --- a/src/test/ui/rfc-2361-dbg-macro/dbg-macro-requires-debug.stderr +++ b/src/test/ui/rfc-2361-dbg-macro/dbg-macro-requires-debug.stderr @@ -8,7 +8,7 @@ LL | let _: NotDebug = dbg!(NotDebug); = note: add `#[derive(Debug)]` or manually implement `std::fmt::Debug` = note: required because of the requirements on the impl of `std::fmt::Debug` for `&NotDebug` = note: required by `std::fmt::Debug::fmt` - = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z macro-backtrace for more info) + = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) error: aborting due to previous error diff --git a/src/test/ui/rust-2018/suggestions-not-always-applicable.stderr b/src/test/ui/rust-2018/suggestions-not-always-applicable.stderr index 8495fe62575bf..30f98d6df9e09 100644 --- a/src/test/ui/rust-2018/suggestions-not-always-applicable.stderr +++ b/src/test/ui/rust-2018/suggestions-not-always-applicable.stderr @@ -12,6 +12,7 @@ LL | #![warn(rust_2018_compatibility)] = note: `#[warn(absolute_paths_not_starting_with_crate)]` implied by `#[warn(rust_2018_compatibility)]` = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in the 2018 edition! = note: for more information, see issue #53130 + = note: this warning originates in an attribute macro (in Nightly builds, run with -Z macro-backtrace for more info) warning: absolute paths must start with `self`, `super`, `crate`, or an external crate name in the 2018 edition --> $DIR/suggestions-not-always-applicable.rs:17:5 @@ -21,4 +22,5 @@ LL | #[foo] | = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in the 2018 edition! = note: for more information, see issue #53130 + = note: this warning originates in an attribute macro (in Nightly builds, run with -Z macro-backtrace for more info) diff --git a/src/test/ui/rust-2018/uniform-paths/ambiguity-macros-nested.stderr b/src/test/ui/rust-2018/uniform-paths/ambiguity-macros-nested.stderr index 27b8d0e216e05..14c2582121bfd 100644 --- a/src/test/ui/rust-2018/uniform-paths/ambiguity-macros-nested.stderr +++ b/src/test/ui/rust-2018/uniform-paths/ambiguity-macros-nested.stderr @@ -17,6 +17,7 @@ LL | | } LL | m!(); | ----- in this macro invocation = help: use `self::std` to refer to this module unambiguously + = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) error: aborting due to previous error diff --git a/src/test/ui/rust-2018/uniform-paths/ambiguity-macros.stderr b/src/test/ui/rust-2018/uniform-paths/ambiguity-macros.stderr index 44b34d2682d8a..de7b79de95c30 100644 --- a/src/test/ui/rust-2018/uniform-paths/ambiguity-macros.stderr +++ b/src/test/ui/rust-2018/uniform-paths/ambiguity-macros.stderr @@ -17,6 +17,7 @@ LL | | } LL | m!(); | ----- in this macro invocation = help: use `crate::std` to refer to this module unambiguously + = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) error: aborting due to previous error diff --git a/src/test/ui/span/E0204.stderr b/src/test/ui/span/E0204.stderr index 5a981a4a6e48f..23c9513f9ccb4 100644 --- a/src/test/ui/span/E0204.stderr +++ b/src/test/ui/span/E0204.stderr @@ -15,6 +15,8 @@ LL | #[derive(Copy)] LL | struct Foo2<'a> { LL | ty: &'a mut bool, | ---------------- this field does not implement `Copy` + | + = note: this error originates in a derive macro (in Nightly builds, run with -Z macro-backtrace for more info) error[E0204]: the trait `Copy` may not be implemented for this type --> $DIR/E0204.rs:17:6 @@ -33,6 +35,8 @@ LL | #[derive(Copy)] LL | enum EFoo2<'a> { LL | Bar(&'a mut bool), | ------------ this field does not implement `Copy` + | + = note: this error originates in a derive macro (in Nightly builds, run with -Z macro-backtrace for more info) error: aborting due to 4 previous errors diff --git a/src/test/ui/span/coerce-suggestions.stderr b/src/test/ui/span/coerce-suggestions.stderr index ee1f99e3b07b4..d1960a8aab300 100644 --- a/src/test/ui/span/coerce-suggestions.stderr +++ b/src/test/ui/span/coerce-suggestions.stderr @@ -49,7 +49,7 @@ error[E0308]: mismatched types LL | s = format!("foo"); | ^^^^^^^^^^^^^^ expected `&mut std::string::String`, found struct `std::string::String` | - = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z macro-backtrace for more info) + = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) error: aborting due to 6 previous errors diff --git a/src/test/ui/span/issue-33884.stderr b/src/test/ui/span/issue-33884.stderr index 3d00ef29052e9..184d9644c83ab 100644 --- a/src/test/ui/span/issue-33884.stderr +++ b/src/test/ui/span/issue-33884.stderr @@ -4,7 +4,7 @@ error[E0308]: mismatched types LL | stream.write_fmt(format!("message received")) | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected struct `std::fmt::Arguments`, found struct `std::string::String` | - = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z macro-backtrace for more info) + = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) error: aborting due to previous error diff --git a/src/test/ui/span/macro-span-replacement.stderr b/src/test/ui/span/macro-span-replacement.stderr index 4eb775155a54d..721d3b121726b 100644 --- a/src/test/ui/span/macro-span-replacement.stderr +++ b/src/test/ui/span/macro-span-replacement.stderr @@ -13,4 +13,5 @@ note: the lint level is defined here LL | #![warn(unused)] | ^^^^^^ = note: `#[warn(dead_code)]` implied by `#[warn(unused)]` + = note: this warning originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) diff --git a/src/test/ui/span/slice-borrow.stderr b/src/test/ui/span/slice-borrow.stderr index b28e3cf8d666e..745936e11eafc 100644 --- a/src/test/ui/span/slice-borrow.stderr +++ b/src/test/ui/span/slice-borrow.stderr @@ -10,7 +10,7 @@ LL | y.use_ref(); | - borrow later used here | = note: consider using a `let` binding to create a longer lived value - = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z macro-backtrace for more info) + = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) error: aborting due to previous error diff --git a/src/test/ui/suggestions/dont-suggest-deref-inside-macro-issue-58298.stderr b/src/test/ui/suggestions/dont-suggest-deref-inside-macro-issue-58298.stderr index f928510454ae3..b0cef952b2107 100644 --- a/src/test/ui/suggestions/dont-suggest-deref-inside-macro-issue-58298.stderr +++ b/src/test/ui/suggestions/dont-suggest-deref-inside-macro-issue-58298.stderr @@ -6,7 +6,7 @@ LL | | "abc" LL | | }; | |______^ expected `&str`, found struct `std::string::String` | - = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z macro-backtrace for more info) + = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) error: aborting due to previous error diff --git a/src/test/ui/suggestions/dont-suggest-try_into-in-macros.stderr b/src/test/ui/suggestions/dont-suggest-try_into-in-macros.stderr index 092503cdf8063..b1ea100f16464 100644 --- a/src/test/ui/suggestions/dont-suggest-try_into-in-macros.stderr +++ b/src/test/ui/suggestions/dont-suggest-try_into-in-macros.stderr @@ -4,7 +4,7 @@ error[E0308]: mismatched types LL | assert_eq!(10u64, 10usize); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `u64`, found `usize` | - = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z macro-backtrace for more info) + = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) error: aborting due to previous error diff --git a/src/test/ui/suggestions/mut-borrow-needed-by-trait.stderr b/src/test/ui/suggestions/mut-borrow-needed-by-trait.stderr index 5d26366fe83c6..8dc041ace3662 100644 --- a/src/test/ui/suggestions/mut-borrow-needed-by-trait.stderr +++ b/src/test/ui/suggestions/mut-borrow-needed-by-trait.stderr @@ -33,7 +33,7 @@ LL | writeln!(fp, "hello world").unwrap(); | = note: the method `write_fmt` exists but the following trait bounds were not satisfied: `std::io::BufWriter<&dyn std::io::Write> : std::io::Write` - = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z macro-backtrace for more info) + = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) error: aborting due to 4 previous errors diff --git a/src/test/ui/suggestions/path-display.stderr b/src/test/ui/suggestions/path-display.stderr index 39d236af4f3ae..13546cddbd359 100644 --- a/src/test/ui/suggestions/path-display.stderr +++ b/src/test/ui/suggestions/path-display.stderr @@ -8,6 +8,7 @@ LL | println!("{}", path); = note: call `.display()` or `.to_string_lossy()` to safely print paths, as they may contain non-Unicode data = note: required because of the requirements on the impl of `std::fmt::Display` for `&std::path::Path` = note: required by `std::fmt::Display::fmt` + = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) error: aborting due to previous error diff --git a/src/test/ui/suggestions/vec-macro-in-pattern.stderr b/src/test/ui/suggestions/vec-macro-in-pattern.stderr index a69502de786f0..f9d0464ac88b1 100644 --- a/src/test/ui/suggestions/vec-macro-in-pattern.stderr +++ b/src/test/ui/suggestions/vec-macro-in-pattern.stderr @@ -10,7 +10,7 @@ LL | Some(vec![_x]) => (), | help: use a slice pattern here instead: `[_x]` | = help: for more information, see https://doc.rust-lang.org/edition-guide/rust-2018/slice-patterns.html - = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z macro-backtrace for more info) + = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) error: aborting due to previous error diff --git a/src/test/ui/trace_macros-gate.stderr b/src/test/ui/trace_macros-gate.stderr index 7b9542730713c..7b46bee6a6465 100644 --- a/src/test/ui/trace_macros-gate.stderr +++ b/src/test/ui/trace_macros-gate.stderr @@ -42,6 +42,7 @@ LL | expando!(true); | = note: for more information, see https://github.com/rust-lang/rust/issues/29598 = help: add `#![feature(trace_macros)]` to the crate attributes to enable + = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) error: aborting due to 5 previous errors diff --git a/src/test/ui/try-block/try-block-opt-init.stderr b/src/test/ui/try-block/try-block-opt-init.stderr index d88397f398f88..6bae3a8587df0 100644 --- a/src/test/ui/try-block/try-block-opt-init.stderr +++ b/src/test/ui/try-block/try-block-opt-init.stderr @@ -4,7 +4,7 @@ error[E0381]: borrow of possibly-uninitialized variable: `cfg_res` LL | assert_eq!(cfg_res, 5); | ^^^^^^^^^^^^^^^^^^^^^^^ use of possibly-uninitialized `cfg_res` | - = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z macro-backtrace for more info) + = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) error: aborting due to previous error diff --git a/src/test/ui/tuple/tuple-struct-fields/test2.stderr b/src/test/ui/tuple/tuple-struct-fields/test2.stderr index 2f1ca2fe0c1e7..d6ea3626675d8 100644 --- a/src/test/ui/tuple/tuple-struct-fields/test2.stderr +++ b/src/test/ui/tuple/tuple-struct-fields/test2.stderr @@ -8,6 +8,8 @@ LL | struct S3(pub $t ()); ... LL | define_struct! { (foo) } | ------------------------ in this macro invocation + | + = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) error[E0412]: cannot find type `foo` in this scope --> $DIR/test2.rs:11:23 diff --git a/src/test/ui/tuple/tuple-struct-fields/test3.stderr b/src/test/ui/tuple/tuple-struct-fields/test3.stderr index 5d42fe6ef50b3..b38513e5a92a3 100644 --- a/src/test/ui/tuple/tuple-struct-fields/test3.stderr +++ b/src/test/ui/tuple/tuple-struct-fields/test3.stderr @@ -8,6 +8,8 @@ LL | struct S3(pub($t) ()); ... LL | define_struct! { foo } | ---------------------- in this macro invocation + | + = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) error[E0412]: cannot find type `foo` in this scope --> $DIR/test3.rs:11:22 diff --git a/src/test/ui/type/ascription/issue-47666.stderr b/src/test/ui/type/ascription/issue-47666.stderr index d6f4a8d761914..baffe4ea351c0 100644 --- a/src/test/ui/type/ascription/issue-47666.stderr +++ b/src/test/ui/type/ascription/issue-47666.stderr @@ -11,7 +11,7 @@ LL | let _ = Option:Some(vec![0, 1]); | = note: `#![feature(type_ascription)]` lets you annotate an expression with a type: `: ` = note: for more information, see https://github.com/rust-lang/rust/issues/23416 - = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z macro-backtrace for more info) + = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) error: aborting due to previous error diff --git a/src/test/ui/type/type-check/cannot_infer_local_or_vec.stderr b/src/test/ui/type/type-check/cannot_infer_local_or_vec.stderr index 7f0de3f1d70de..8162fed2cd8ec 100644 --- a/src/test/ui/type/type-check/cannot_infer_local_or_vec.stderr +++ b/src/test/ui/type/type-check/cannot_infer_local_or_vec.stderr @@ -6,7 +6,7 @@ LL | let x = vec![]; | | | consider giving `x` the explicit type `std::vec::Vec`, where the type parameter `T` is specified | - = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z macro-backtrace for more info) + = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) error: aborting due to previous error diff --git a/src/test/ui/type/type-check/cannot_infer_local_or_vec_in_tuples.stderr b/src/test/ui/type/type-check/cannot_infer_local_or_vec_in_tuples.stderr index 1fa436c216b37..e62565c8f9b70 100644 --- a/src/test/ui/type/type-check/cannot_infer_local_or_vec_in_tuples.stderr +++ b/src/test/ui/type/type-check/cannot_infer_local_or_vec_in_tuples.stderr @@ -6,7 +6,7 @@ LL | let (x, ) = (vec![], ); | | | consider giving this pattern the explicit type `(std::vec::Vec,)`, where the type parameter `T` is specified | - = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z macro-backtrace for more info) + = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) error: aborting due to previous error diff --git a/src/test/ui/union/union-derive-clone.stderr b/src/test/ui/union/union-derive-clone.stderr index 0ef5753b5907d..12b5321331a79 100644 --- a/src/test/ui/union/union-derive-clone.stderr +++ b/src/test/ui/union/union-derive-clone.stderr @@ -5,6 +5,7 @@ LL | #[derive(Clone)] | ^^^^^ the trait `std::marker::Copy` is not implemented for `U1` | = note: required by `std::clone::AssertParamIsCopy` + = note: this error originates in a derive macro (in Nightly builds, run with -Z macro-backtrace for more info) error[E0599]: no method named `clone` found for union `U5` in the current scope --> $DIR/union-derive-clone.rs:37:15 diff --git a/src/test/ui/union/union-derive-eq.stderr b/src/test/ui/union/union-derive-eq.stderr index f63ab1704c497..0955c161871d2 100644 --- a/src/test/ui/union/union-derive-eq.stderr +++ b/src/test/ui/union/union-derive-eq.stderr @@ -5,6 +5,7 @@ LL | a: PartialEqNotEq, | ^^^^^^^^^^^^^^^^^ the trait `std::cmp::Eq` is not implemented for `PartialEqNotEq` | = note: required by `std::cmp::AssertParamIsEq` + = note: this error originates in a derive macro (in Nightly builds, run with -Z macro-backtrace for more info) error: aborting due to previous error diff --git a/src/test/ui/unreachable-code-ret.stderr b/src/test/ui/unreachable-code-ret.stderr index 021f8b03eab3a..72abb4fc8db19 100644 --- a/src/test/ui/unreachable-code-ret.stderr +++ b/src/test/ui/unreachable-code-ret.stderr @@ -11,7 +11,7 @@ note: the lint level is defined here | LL | #![deny(unreachable_code)] | ^^^^^^^^^^^^^^^^ - = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z macro-backtrace for more info) + = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) error: aborting due to previous error diff --git a/src/test/ui/unused/unused-macro-rules.stderr b/src/test/ui/unused/unused-macro-rules.stderr index 9bb3c3f3dec8c..532d9339781d2 100644 --- a/src/test/ui/unused/unused-macro-rules.stderr +++ b/src/test/ui/unused/unused-macro-rules.stderr @@ -22,6 +22,8 @@ LL | | } ... LL | create_macro!(); | ---------------- in this macro invocation + | + = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) error: unused macro definition --> $DIR/unused-macro-rules.rs:24:5 diff --git a/src/test/ui/while-let.stderr b/src/test/ui/while-let.stderr index 09f0d641de060..b2f2ec97c1467 100644 --- a/src/test/ui/while-let.stderr +++ b/src/test/ui/while-let.stderr @@ -10,6 +10,7 @@ LL | | }); | |_______- in this macro invocation | = note: `#[warn(irrefutable_let_patterns)]` on by default + = note: this warning originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) warning: irrefutable while-let pattern --> $DIR/while-let.rs:7:13 @@ -21,6 +22,8 @@ LL | / bar!(_a, 1, { LL | | println!("irrefutable pattern"); LL | | }); | |_______- in this macro invocation + | + = note: this warning originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) warning: irrefutable while-let pattern --> $DIR/while-let.rs:27:5 From 96af578cd9249223c89266306b104820e771858f Mon Sep 17 00:00:00 2001 From: Eduard-Mihai Burtescu Date: Thu, 6 Feb 2020 12:16:38 +0200 Subject: [PATCH 6/6] tests: add a revision to macro_backtrace without -Zmacro-backtrace. --- ...n.stderr => main.-Zmacro-backtrace.stderr} | 6 ++-- .../ui/macro_backtrace/main.default.stderr | 35 +++++++++++++++++++ src/test/ui/macro_backtrace/main.rs | 3 +- 3 files changed, 40 insertions(+), 4 deletions(-) rename src/test/ui/macro_backtrace/{main.stderr => main.-Zmacro-backtrace.stderr} (96%) create mode 100644 src/test/ui/macro_backtrace/main.default.stderr diff --git a/src/test/ui/macro_backtrace/main.stderr b/src/test/ui/macro_backtrace/main.-Zmacro-backtrace.stderr similarity index 96% rename from src/test/ui/macro_backtrace/main.stderr rename to src/test/ui/macro_backtrace/main.-Zmacro-backtrace.stderr index c4950e0fdf5b2..41ed545cf1687 100644 --- a/src/test/ui/macro_backtrace/main.stderr +++ b/src/test/ui/macro_backtrace/main.-Zmacro-backtrace.stderr @@ -1,5 +1,5 @@ error: expected one of `!`, `.`, `::`, `;`, `?`, `{`, `}`, or an operator, found `error` - --> $DIR/main.rs:9:20 + --> $DIR/main.rs:10:20 | LL | / macro_rules! pong { LL | | () => { syntax error }; @@ -11,7 +11,7 @@ LL | pong!(); | -------- in this macro invocation error: expected one of `!`, `.`, `::`, `;`, `?`, `{`, `}`, or an operator, found `error` - --> $DIR/main.rs:9:20 + --> $DIR/main.rs:10:20 | LL | / macro_rules! pong { LL | | () => { syntax error }; @@ -31,7 +31,7 @@ LL | () => { pong ! () ; } | in this expansion of `ping!` error: expected one of `!`, `.`, `::`, `;`, `?`, `{`, `}`, or an operator, found `error` - --> $DIR/main.rs:9:20 + --> $DIR/main.rs:10:20 | LL | / macro_rules! pong { LL | | () => { syntax error }; diff --git a/src/test/ui/macro_backtrace/main.default.stderr b/src/test/ui/macro_backtrace/main.default.stderr new file mode 100644 index 0000000000000..fac76fd6080fe --- /dev/null +++ b/src/test/ui/macro_backtrace/main.default.stderr @@ -0,0 +1,35 @@ +error: expected one of `!`, `.`, `::`, `;`, `?`, `{`, `}`, or an operator, found `error` + --> $DIR/main.rs:10:20 + | +LL | () => { syntax error }; + | ^^^^^ expected one of 8 possible tokens +... +LL | pong!(); + | -------- in this macro invocation + | + = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) + +error: expected one of `!`, `.`, `::`, `;`, `?`, `{`, `}`, or an operator, found `error` + --> $DIR/main.rs:10:20 + | +LL | () => { syntax error }; + | ^^^^^ expected one of 8 possible tokens +... +LL | ping!(); + | -------- in this macro invocation + | + = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) + +error: expected one of `!`, `.`, `::`, `;`, `?`, `{`, `}`, or an operator, found `error` + --> $DIR/main.rs:10:20 + | +LL | () => { syntax error }; + | ^^^^^ expected one of 8 possible tokens +... +LL | deep!(); + | -------- in this macro invocation + | + = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) + +error: aborting due to 3 previous errors + diff --git a/src/test/ui/macro_backtrace/main.rs b/src/test/ui/macro_backtrace/main.rs index 05f35855861f5..6cee3b4cd96d5 100644 --- a/src/test/ui/macro_backtrace/main.rs +++ b/src/test/ui/macro_backtrace/main.rs @@ -1,6 +1,7 @@ // Test that the macro backtrace facility works // aux-build:ping.rs -// compile-flags: -Z macro-backtrace +// revisions: default -Zmacro-backtrace +//[-Zmacro-backtrace] compile-flags: -Z macro-backtrace #[macro_use] extern crate ping;