Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion src/bootstrap/builder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down
10 changes: 5 additions & 5 deletions src/librustc_errors/annotate_snippet_emitter_writer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand All @@ -32,12 +32,12 @@ 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.fix_multispans_in_extern_macros_and_render_macro_backtrace(
&self.source_map,
&mut primary_span,
&mut children,
&diag.level,
self.external_macro_backtrace,
self.macro_backtrace,
);

self.emit_messages_default(
Expand Down Expand Up @@ -172,9 +172,9 @@ impl AnnotateSnippetEmitterWriter {
pub fn new(
source_map: Option<Lrc<SourceMap>>,
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.
Expand Down
Loading