Skip to content

Commit 813b5de

Browse files
committed
remove temporarily invalid code to be added back in a diff PR
1 parent 7f2af2a commit 813b5de

File tree

1 file changed

+0
-85
lines changed

1 file changed

+0
-85
lines changed

library/std/src/error.rs

Lines changed: 0 additions & 85 deletions
Original file line numberDiff line numberDiff line change
@@ -1682,72 +1682,6 @@ where
16821682
}
16831683
}
16841684

1685-
// impl Report<Box<dyn Error>> {
1686-
// fn backtrace(&self) -> Option<&Backtrace> {
1687-
// // have to grab the backtrace on the first error directly since that error may not be
1688-
// // 'static
1689-
// let backtrace = self.error.request_ref();
1690-
// let backtrace = backtrace.or_else(|| {
1691-
// self.error
1692-
// .source()
1693-
// .map(|source| source.chain().find_map(|source| source.request_ref()))
1694-
// .flatten()
1695-
// });
1696-
// backtrace
1697-
// }
1698-
1699-
// /// Format the report as a single line.
1700-
// #[unstable(feature = "error_reporter", issue = "90172")]
1701-
// fn fmt_singleline(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
1702-
// write!(f, "{}", self.error)?;
1703-
1704-
// let sources = self.error.source().into_iter().flat_map(<dyn Error>::chain);
1705-
1706-
// for cause in sources {
1707-
// write!(f, ": {cause}")?;
1708-
// }
1709-
1710-
// Ok(())
1711-
// }
1712-
1713-
// /// Format the report as multiple lines, with each error cause on its own line.
1714-
// #[unstable(feature = "error_reporter", issue = "90172")]
1715-
// fn fmt_multiline(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
1716-
// let error = &self.error;
1717-
1718-
// write!(f, "{error}")?;
1719-
1720-
// if let Some(cause) = error.source() {
1721-
// write!(f, "\n\nCaused by:")?;
1722-
1723-
// let multiple = cause.source().is_some();
1724-
1725-
// for (ind, error) in cause.chain().enumerate() {
1726-
// writeln!(f)?;
1727-
// let mut indented = Indented { inner: f };
1728-
// if multiple {
1729-
// write!(indented, "{ind: >4}: {error}")?;
1730-
// } else {
1731-
// write!(indented, " {error}")?;
1732-
// }
1733-
// }
1734-
// }
1735-
1736-
// if self.show_backtrace {
1737-
// let backtrace = self.backtrace();
1738-
1739-
// if let Some(backtrace) = backtrace {
1740-
// let backtrace = backtrace.to_string();
1741-
1742-
// f.write_str("\n\nStack backtrace:\n")?;
1743-
// f.write_str(backtrace.trim_end())?;
1744-
// }
1745-
// }
1746-
1747-
// Ok(())
1748-
// }
1749-
// }
1750-
17511685
#[unstable(feature = "error_reporter", issue = "90172")]
17521686
impl<E> From<E> for Report<E>
17531687
where
@@ -1758,18 +1692,6 @@ where
17581692
}
17591693
}
17601694

1761-
// FIXME(yaahc): replace Box<dyn Error> with a newtype
1762-
// #[unstable(feature = "error_reporter", issue = "90172")]
1763-
// impl<'a, E> From<E> for Report<Box<dyn Error + 'a>>
1764-
// where
1765-
// E: Error + 'a,
1766-
// {
1767-
// fn from(error: E) -> Self {
1768-
// let error = box error;
1769-
// Report { error, show_backtrace: false, pretty: false }
1770-
// }
1771-
// }
1772-
17731695
#[unstable(feature = "error_reporter", issue = "90172")]
17741696
impl<E> fmt::Display for Report<E>
17751697
where
@@ -1780,13 +1702,6 @@ where
17801702
}
17811703
}
17821704

1783-
// #[unstable(feature = "error_reporter", issue = "90172")]
1784-
// impl fmt::Display for Report<Box<dyn Error>> {
1785-
// fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
1786-
// if self.pretty { self.fmt_multiline(f) } else { self.fmt_singleline(f) }
1787-
// }
1788-
// }
1789-
17901705
// This type intentionally outputs the same format for `Display` and `Debug`for
17911706
// situations where you unwrap a `Report` or return it from main.
17921707
#[unstable(feature = "error_reporter", issue = "90172")]

0 commit comments

Comments
 (0)