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
1 changed files with 2 additions and 2 deletions
|
@ -6,7 +6,7 @@ use rustc_middle::mir::AssertKind;
|
||||||
use rustc_middle::query::TyCtxtAt;
|
use rustc_middle::query::TyCtxtAt;
|
||||||
use rustc_middle::ty::TyCtxt;
|
use rustc_middle::ty::TyCtxt;
|
||||||
use rustc_middle::ty::{layout::LayoutError, ConstInt};
|
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 super::{CompileTimeInterpreter, InterpCx};
|
||||||
use crate::errors::{self, FrameNote, ReportErrorExt};
|
use crate::errors::{self, FrameNote, ReportErrorExt};
|
||||||
|
@ -133,7 +133,7 @@ pub(super) fn report<'tcx, C, F, E>(
|
||||||
where
|
where
|
||||||
C: FnOnce() -> (Span, Vec<FrameNote>),
|
C: FnOnce() -> (Span, Vec<FrameNote>),
|
||||||
F: FnOnce(Span, Vec<FrameNote>) -> E,
|
F: FnOnce(Span, Vec<FrameNote>) -> E,
|
||||||
E: IntoDiagnostic<'tcx, ErrorGuaranteed>,
|
E: IntoDiagnostic<'tcx>,
|
||||||
{
|
{
|
||||||
// Special handling for certain errors
|
// Special handling for certain errors
|
||||||
match error {
|
match error {
|
||||||
|
|
Loading…
Add table
Reference in a new issue