diff options
| author | Nicholas Nethercote <n.nethercote@gmail.com> | 2023-12-19 15:21:35 +1100 |
|---|---|---|
| committer | Nicholas Nethercote <n.nethercote@gmail.com> | 2023-12-23 13:18:50 +1100 |
| commit | 6257f3bf1f8679296eeb69b3578573d3fed78b31 (patch) | |
| tree | cb1c9e40aae0e7727a479260e4cb3b1090141ee8 /compiler/rustc_const_eval | |
| parent | aec78dd695e7477033bb4d4efacdc8eb659a230a (diff) | |
| download | rust-6257f3bf1f8679296eeb69b3578573d3fed78b31.tar.gz rust-6257f3bf1f8679296eeb69b3578573d3fed78b31.zip | |
Use `IntoDiagnostic` default.
`IntoDiagnostic` defaults to `G = ErrorGuaranteed`. Take advantage of this in one place that currently doesn't.
Diffstat (limited to 'compiler/rustc_const_eval')
| -rw-r--r-- | compiler/rustc_const_eval/src/const_eval/error.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/compiler/rustc_const_eval/src/const_eval/error.rs b/compiler/rustc_const_eval/src/const_eval/error.rs index 8f18cd78d3f..2cafbb9331d 100644 --- a/compiler/rustc_const_eval/src/const_eval/error.rs +++ b/compiler/rustc_const_eval/src/const_eval/error.rs @@ -6,7 +6,7 @@ use rustc_middle::mir::AssertKind; use rustc_middle::query::TyCtxtAt; use rustc_middle::ty::TyCtxt; use rustc_middle::ty::{layout::LayoutError, ConstInt}; -use rustc_span::{ErrorGuaranteed, Span, Symbol, DUMMY_SP}; +use rustc_span::{Span, Symbol, DUMMY_SP}; use super::{CompileTimeInterpreter, InterpCx}; use crate::errors::{self, FrameNote, ReportErrorExt}; @@ -133,7 +133,7 @@ pub(super) fn report<'tcx, C, F, E>( where C: FnOnce() -> (Span, Vec<FrameNote>), F: FnOnce(Span, Vec<FrameNote>) -> E, - E: IntoDiagnostic<'tcx, ErrorGuaranteed>, + E: IntoDiagnostic<'tcx>, { // Special handling for certain errors match error { |
