mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-22 06:44:35 +00:00
Use IntoDiagnostic
default.
`IntoDiagnostic` defaults to `G = ErrorGuaranteed`. Take advantage of this in one place that currently doesn't.
This commit is contained in:
parent
aec78dd695
commit
6257f3bf1f
@ -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 {
|
||||
|
Loading…
Reference in New Issue
Block a user