Use Session::diagnostic in more places.

This commit is contained in:
Nicholas Nethercote 2023-12-01 13:35:19 +11:00
parent 6e9573936f
commit a179a53565
21 changed files with 51 additions and 66 deletions

View file

@ -148,7 +148,7 @@ where
let mut err = tcx.sess.create_err(err);
let msg = error.diagnostic_message();
error.add_args(&tcx.sess.parse_sess.span_diagnostic, &mut err);
error.add_args(tcx.sess.diagnostic(), &mut err);
// Use *our* span to label the interp error
err.span_label(our_span, msg);