fix comment
This commit is contained in:
parent
b37e645d80
commit
a42c0d79da
3 changed files with 3 additions and 4 deletions
|
@ -1,6 +1,6 @@
|
||||||
middle_drop_check_overflow =
|
middle_drop_check_overflow =
|
||||||
overflow while adding drop-check rules for {$ty}
|
overflow while adding drop-check rules for {$ty}
|
||||||
.note = {$note}
|
.note = overflowed on {$overflow_ty}
|
||||||
|
|
||||||
middle_opaque_hidden_type_mismatch =
|
middle_opaque_hidden_type_mismatch =
|
||||||
concrete type differs from previous defining opaque type use
|
concrete type differs from previous defining opaque type use
|
||||||
|
|
|
@ -10,7 +10,7 @@ pub struct DropCheckOverflow<'tcx> {
|
||||||
#[primary_span]
|
#[primary_span]
|
||||||
pub span: Span,
|
pub span: Span,
|
||||||
pub ty: Ty<'tcx>,
|
pub ty: Ty<'tcx>,
|
||||||
pub note: String,
|
pub overflow_ty: Ty<'tcx>,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(SessionDiagnostic)]
|
#[derive(SessionDiagnostic)]
|
||||||
|
|
|
@ -117,8 +117,7 @@ pub struct DropckOutlivesResult<'tcx> {
|
||||||
impl<'tcx> DropckOutlivesResult<'tcx> {
|
impl<'tcx> DropckOutlivesResult<'tcx> {
|
||||||
pub fn report_overflows(&self, tcx: TyCtxt<'tcx>, span: Span, ty: Ty<'tcx>) {
|
pub fn report_overflows(&self, tcx: TyCtxt<'tcx>, span: Span, ty: Ty<'tcx>) {
|
||||||
if let Some(overflow_ty) = self.overflows.get(0) {
|
if let Some(overflow_ty) = self.overflows.get(0) {
|
||||||
let note = format!("overflowed on {}", overflow_ty);
|
tcx.sess.emit_err(DropCheckOverflow { span, ty, overflow_ty: *overflow_ty });
|
||||||
tcx.sess.emit_err(DropCheckOverflow { span, ty, note });
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue