|
1 | 1 | use alloc::vec::Vec; |
2 | | -use core::fmt; |
3 | 2 | use core::num::{NonZeroU64, Wrapping}; |
4 | | -use core::result; |
5 | 3 |
|
6 | 4 | use crate::common::{ |
7 | 5 | DebugLineOffset, DebugLineStrOffset, DebugStrOffset, DebugStrOffsetsIndex, Encoding, Format, |
@@ -518,58 +516,6 @@ where |
518 | 516 | } |
519 | 517 | } |
520 | 518 |
|
521 | | -impl<R, Offset> fmt::Display for LineInstruction<R, Offset> |
522 | | -where |
523 | | - R: Reader<Offset = Offset>, |
524 | | - Offset: ReaderOffset, |
525 | | -{ |
526 | | - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> result::Result<(), fmt::Error> { |
527 | | - match *self { |
528 | | - LineInstruction::Special(opcode) => write!(f, "Special opcode {}", opcode), |
529 | | - LineInstruction::Copy => write!(f, "{}", constants::DW_LNS_copy), |
530 | | - LineInstruction::AdvancePc(advance) => { |
531 | | - write!(f, "{} by {}", constants::DW_LNS_advance_pc, advance) |
532 | | - } |
533 | | - LineInstruction::AdvanceLine(increment) => { |
534 | | - write!(f, "{} by {}", constants::DW_LNS_advance_line, increment) |
535 | | - } |
536 | | - LineInstruction::SetFile(file) => { |
537 | | - write!(f, "{} to {}", constants::DW_LNS_set_file, file) |
538 | | - } |
539 | | - LineInstruction::SetColumn(column) => { |
540 | | - write!(f, "{} to {}", constants::DW_LNS_set_column, column) |
541 | | - } |
542 | | - LineInstruction::NegateStatement => write!(f, "{}", constants::DW_LNS_negate_stmt), |
543 | | - LineInstruction::SetBasicBlock => write!(f, "{}", constants::DW_LNS_set_basic_block), |
544 | | - LineInstruction::ConstAddPc => write!(f, "{}", constants::DW_LNS_const_add_pc), |
545 | | - LineInstruction::FixedAddPc(advance) => { |
546 | | - write!(f, "{} by {}", constants::DW_LNS_fixed_advance_pc, advance) |
547 | | - } |
548 | | - LineInstruction::SetPrologueEnd => write!(f, "{}", constants::DW_LNS_set_prologue_end), |
549 | | - LineInstruction::SetEpilogueBegin => { |
550 | | - write!(f, "{}", constants::DW_LNS_set_epilogue_begin) |
551 | | - } |
552 | | - LineInstruction::SetIsa(isa) => write!(f, "{} to {}", constants::DW_LNS_set_isa, isa), |
553 | | - LineInstruction::UnknownStandard0(opcode) => write!(f, "Unknown {}", opcode), |
554 | | - LineInstruction::UnknownStandard1(opcode, arg) => { |
555 | | - write!(f, "Unknown {} with operand {}", opcode, arg) |
556 | | - } |
557 | | - LineInstruction::UnknownStandardN(opcode, ref args) => { |
558 | | - write!(f, "Unknown {} with operands {:?}", opcode, args) |
559 | | - } |
560 | | - LineInstruction::EndSequence => write!(f, "{}", constants::DW_LNE_end_sequence), |
561 | | - LineInstruction::SetAddress(address) => { |
562 | | - write!(f, "{} to {}", constants::DW_LNE_set_address, address) |
563 | | - } |
564 | | - LineInstruction::DefineFile(_) => write!(f, "{}", constants::DW_LNE_define_file), |
565 | | - LineInstruction::SetDiscriminator(discr) => { |
566 | | - write!(f, "{} to {}", constants::DW_LNE_set_discriminator, discr) |
567 | | - } |
568 | | - LineInstruction::UnknownExtended(opcode, _) => write!(f, "Unknown {}", opcode), |
569 | | - } |
570 | | - } |
571 | | -} |
572 | | - |
573 | 519 | /// Deprecated. `OpcodesIter` has been renamed to `LineInstructions`. |
574 | 520 | #[deprecated(note = "OpcodesIter has been renamed to LineInstructions, use that instead.")] |
575 | 521 | pub type OpcodesIter<R> = LineInstructions<R>; |
|
0 commit comments