use derive(Debug) for TypeTrace

This commit is contained in:
Niko Matsakis 2019-11-11 13:14:57 -05:00
parent 534f044425
commit 6bc79c9cf3
1 changed files with 1 additions and 7 deletions

View File

@ -246,7 +246,7 @@ pub enum ValuePairs<'tcx> {
/// encounter an error or subtyping constraint. /// encounter an error or subtyping constraint.
/// ///
/// See the `error_reporting` module for more details. /// See the `error_reporting` module for more details.
#[derive(Clone)] #[derive(Clone, Debug)]
pub struct TypeTrace<'tcx> { pub struct TypeTrace<'tcx> {
cause: ObligationCause<'tcx>, cause: ObligationCause<'tcx>,
values: ValuePairs<'tcx>, values: ValuePairs<'tcx>,
@ -1647,12 +1647,6 @@ impl<'tcx> TypeTrace<'tcx> {
} }
} }
impl<'tcx> fmt::Debug for TypeTrace<'tcx> {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
write!(f, "TypeTrace({:?})", self.cause)
}
}
impl<'tcx> SubregionOrigin<'tcx> { impl<'tcx> SubregionOrigin<'tcx> {
pub fn span(&self) -> Span { pub fn span(&self) -> Span {
match *self { match *self {