mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-25 08:13:41 +00:00
fix comment
This commit is contained in:
parent
b37e645d80
commit
a42c0d79da
@ -1,6 +1,6 @@
|
||||
middle_drop_check_overflow =
|
||||
overflow while adding drop-check rules for {$ty}
|
||||
.note = {$note}
|
||||
.note = overflowed on {$overflow_ty}
|
||||
|
||||
middle_opaque_hidden_type_mismatch =
|
||||
concrete type differs from previous defining opaque type use
|
||||
|
@ -10,7 +10,7 @@ pub struct DropCheckOverflow<'tcx> {
|
||||
#[primary_span]
|
||||
pub span: Span,
|
||||
pub ty: Ty<'tcx>,
|
||||
pub note: String,
|
||||
pub overflow_ty: Ty<'tcx>,
|
||||
}
|
||||
|
||||
#[derive(SessionDiagnostic)]
|
||||
|
@ -117,8 +117,7 @@ pub struct DropckOutlivesResult<'tcx> {
|
||||
impl<'tcx> DropckOutlivesResult<'tcx> {
|
||||
pub fn report_overflows(&self, tcx: TyCtxt<'tcx>, span: Span, ty: Ty<'tcx>) {
|
||||
if let Some(overflow_ty) = self.overflows.get(0) {
|
||||
let note = format!("overflowed on {}", overflow_ty);
|
||||
tcx.sess.emit_err(DropCheckOverflow { span, ty, note });
|
||||
tcx.sess.emit_err(DropCheckOverflow { span, ty, overflow_ty: *overflow_ty });
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user