Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Automatic Rustup #3264

Merged
merged 17 commits into from
Jan 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
17 commits
Select commit Hold shift + click to select a range
1f582be
Add missing `DiagnosticBuilder::eager_diagnostic` method.
nnethercote Jan 8, 2024
60c8f35
Auto merge of #119751 - nnethercote:error-api-fixes, r=oli-obk
bors Jan 10, 2024
b47e611
Change how `force-warn` lint diagnostics are recorded.
nnethercote Jan 9, 2024
814cf0d
Auto merge of #119688 - Nadrieril:dont-alloc-custom-wildcards, r=comp…
bors Jan 11, 2024
2aa0d1b
Rollup merge of #115046 - joshtriplett:master, r=compiler-errors
matthiaskrgr Jan 11, 2024
29968be
Rollup merge of #118915 - compiler-errors:alias-nits, r=lcnr
matthiaskrgr Jan 11, 2024
1da4ffa
Rollup merge of #119637 - aoli-al:master, r=cuviper
matthiaskrgr Jan 11, 2024
173afdb
Rollup merge of #119715 - Nadrieril:graceful-type-error, r=compiler-e…
matthiaskrgr Jan 11, 2024
5fd3c36
Rollup merge of #119763 - nnethercote:cleanup-Diagnostic, r=oli-obk
matthiaskrgr Jan 11, 2024
3767172
Rollup merge of #119788 - mj10021:issue-119787-fix, r=oli-obk
matthiaskrgr Jan 11, 2024
48b44f8
Rollup merge of #119790 - celinval:smir-all-traits, r=oli-obk
matthiaskrgr Jan 11, 2024
5f4772e
Rollup merge of #119803 - oli-obk:even_more_follow_up_errors, r=compi…
matthiaskrgr Jan 11, 2024
cef77ba
Rollup merge of #119804 - tmccombs:stabilize-unpoison, r=cuviper
matthiaskrgr Jan 11, 2024
b5f59ea
Rollup merge of #119832 - fmease:project-const-traits-triagebot, r=co…
matthiaskrgr Jan 11, 2024
74785ec
Auto merge of #119837 - matthiaskrgr:rollup-l2olpad, r=matthiaskrgr
bors Jan 11, 2024
7d80597
Preparing for merge from rustc
Jan 11, 2024
50f1e38
Merge from rustc
Jan 11, 2024
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
2 changes: 1 addition & 1 deletion rust-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
94807670a6a3834cc9b71b0b803d49d307c9ba5d
65b323b168daa6c723a8a5b4ddf939f3b12e0329
8 changes: 3 additions & 5 deletions src/diagnostics.rs
Original file line number Diff line number Diff line change
Expand Up @@ -455,7 +455,7 @@ pub fn report_msg<'tcx>(
let sess = machine.tcx.sess;
let level = match diag_level {
DiagLevel::Error => Level::Error,
DiagLevel::Warning => Level::Warning(None),
DiagLevel::Warning => Level::Warning,
DiagLevel::Note => Level::Note,
};
let mut err = DiagnosticBuilder::<()>::new(sess.dcx(), level, title);
Expand Down Expand Up @@ -499,22 +499,20 @@ pub fn report_msg<'tcx>(
err.note(if extra_span { "BACKTRACE (of the first span):" } else { "BACKTRACE:" });
}

let (mut err, handler) = err.into_diagnostic().unwrap();

// Add backtrace
for (idx, frame_info) in stacktrace.iter().enumerate() {
let is_local = machine.is_local(frame_info);
// No span for non-local frames and the first frame (which is the error site).
if is_local && idx > 0 {
err.eager_subdiagnostic(handler, frame_info.as_note(machine.tcx));
err.eager_subdiagnostic(err.dcx, frame_info.as_note(machine.tcx));
} else {
let sm = sess.source_map();
let span = sm.span_to_embeddable_string(frame_info.span);
err.note(format!("{frame_info} at {span}"));
}
}

handler.emit_diagnostic(err);
err.emit();
}

impl<'mir, 'tcx> MiriMachine<'mir, 'tcx> {
Expand Down