diff options
| author | Nicholas Nethercote <n.nethercote@gmail.com> | 2023-12-18 22:21:37 +1100 |
|---|---|---|
| committer | Nicholas Nethercote <n.nethercote@gmail.com> | 2023-12-24 08:05:28 +1100 |
| commit | 99472c7049783605444ab888a97059d0cce93a12 (patch) | |
| tree | 686e31682a9d9ae7601cf22722f1b43d3efea5db /compiler/rustc_const_eval/src/errors.rs | |
| parent | d51db05d7ee1a12ee168f2d1ccc93ccc11b216c7 (diff) | |
| download | rust-99472c7049783605444ab888a97059d0cce93a12.tar.gz rust-99472c7049783605444ab888a97059d0cce93a12.zip | |
Remove `Session` methods that duplicate `DiagCtxt` methods.
Also add some `dcx` methods to types that wrap `TyCtxt`, for easier access.
Diffstat (limited to 'compiler/rustc_const_eval/src/errors.rs')
| -rw-r--r-- | compiler/rustc_const_eval/src/errors.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/compiler/rustc_const_eval/src/errors.rs b/compiler/rustc_const_eval/src/errors.rs index eb9bf52676a..110ff87e27e 100644 --- a/compiler/rustc_const_eval/src/errors.rs +++ b/compiler/rustc_const_eval/src/errors.rs @@ -439,8 +439,8 @@ pub trait ReportErrorExt { Self: Sized, { ty::tls::with(move |tcx| { - let mut builder = tcx.sess.struct_allow(DiagnosticMessage::Str(String::new().into())); - let dcx = tcx.sess.dcx(); + let dcx = tcx.dcx(); + let mut builder = dcx.struct_allow(DiagnosticMessage::Str(String::new().into())); let message = self.diagnostic_message(); self.add_args(dcx, &mut builder); let s = dcx.eagerly_translate_to_string(message, builder.args()); |
