@@ -11,7 +11,6 @@ use hir::GeneratorKind;
1111use rustc_errors:: { struct_span_err, DiagnosticBuilder } ;
1212use rustc_hir as hir;
1313use rustc_macros:: HashStable ;
14- use rustc_span:: symbol:: Symbol ;
1514use rustc_span:: { Pos , Span } ;
1615use rustc_target:: spec:: abi:: Abi ;
1716use std:: { any:: Any , env, fmt} ;
@@ -272,7 +271,6 @@ impl<'tcx> From<InterpError<'tcx>> for InterpErrorInfo<'tcx> {
272271/// FIXME: this is not actually an InterpError, and should probably be moved to another module.
273272#[ derive( Clone , RustcEncodable , RustcDecodable , HashStable , PartialEq ) ]
274273pub enum PanicInfo < O > {
275- Panic { msg : Symbol , line : u32 , col : u32 , file : Symbol } ,
276274 BoundsCheck { len : O , index : O } ,
277275 Overflow ( mir:: BinOp ) ,
278276 OverflowNeg ,
@@ -288,7 +286,7 @@ pub type AssertMessage<'tcx> = PanicInfo<mir::Operand<'tcx>>;
288286impl < O > PanicInfo < O > {
289287 /// Getting a description does not require `O` to be printable, and does not
290288 /// require allocation.
291- /// The caller is expected to handle `Panic` and ` BoundsCheck` separately.
289+ /// The caller is expected to handle `BoundsCheck` separately.
292290 pub fn description ( & self ) -> & ' static str {
293291 use PanicInfo :: * ;
294292 match self {
@@ -307,7 +305,7 @@ impl<O> PanicInfo<O> {
307305 ResumedAfterReturn ( GeneratorKind :: Async ( _) ) => "`async fn` resumed after completion" ,
308306 ResumedAfterPanic ( GeneratorKind :: Gen ) => "generator resumed after panicking" ,
309307 ResumedAfterPanic ( GeneratorKind :: Async ( _) ) => "`async fn` resumed after panicking" ,
310- Panic { .. } | BoundsCheck { .. } => bug ! ( "Unexpected PanicInfo" ) ,
308+ BoundsCheck { .. } => bug ! ( "Unexpected PanicInfo" ) ,
311309 }
312310 }
313311}
@@ -316,9 +314,6 @@ impl<O: fmt::Debug> fmt::Debug for PanicInfo<O> {
316314 fn fmt ( & self , f : & mut fmt:: Formatter < ' _ > ) -> fmt:: Result {
317315 use PanicInfo :: * ;
318316 match self {
319- Panic { ref msg, line, col, ref file } => {
320- write ! ( f, "the evaluated program panicked at '{}', {}:{}:{}" , msg, file, line, col)
321- }
322317 BoundsCheck { ref len, ref index } => {
323318 write ! ( f, "index out of bounds: the len is {:?} but the index is {:?}" , len, index)
324319 }
0 commit comments