}
impl ::std::fmt::Display for Fingerprint {
- fn fmt(&self, formatter: &mut ::std::fmt::Formatter) -> Result<(), ::std::fmt::Error> {
+ fn fmt(&self, formatter: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
write!(formatter, "{:x}-{:x}", self.0, self.1)
}
}
}
impl<Node: Idx> fmt::Debug for DominatorTree<Node> {
- fn fmt(&self, fmt: &mut fmt::Formatter) -> Result<(), fmt::Error> {
+ fn fmt(&self, fmt: &mut fmt::Formatter) -> fmt::Result {
fmt::Debug::fmt(&DominatorTreeNode {
tree: self,
node: self.root,
}
impl<'tree, Node: Idx> fmt::Debug for DominatorTreeNode<'tree, Node> {
- fn fmt(&self, fmt: &mut fmt::Formatter) -> Result<(), fmt::Error> {
+ fn fmt(&self, fmt: &mut fmt::Formatter) -> fmt::Result {
let subtrees: Vec<_> = self.tree
.children(self.node)
.iter()
where O: Debug,
T: Debug,
{
- fn fmt(&self, f: &mut fmt::Formatter) -> Result<(), fmt::Error> {
+ fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f,
"OwningRef {{ owner: {:?}, reference: {:?} }}",
self.owner(),
where O: Debug,
T: Debug,
{
- fn fmt(&self, f: &mut fmt::Formatter) -> Result<(), fmt::Error> {
+ fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f,
"OwningRefMut {{ owner: {:?}, reference: {:?} }}",
self.owner(),
where O: Sync, for<'a> (&'a mut T): Sync {}
impl Debug for Erased {
- fn fmt(&self, f: &mut fmt::Formatter) -> Result<(), fmt::Error> {
+ fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "<Erased>",)
}
}
}
impl fmt::Display for FatalError {
- fn fmt(&self, f: &mut fmt::Formatter) -> Result<(), fmt::Error> {
+ fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "parser fatal error")
}
}
pub struct ExplicitBug;
impl fmt::Display for ExplicitBug {
- fn fmt(&self, f: &mut fmt::Formatter) -> Result<(), fmt::Error> {
+ fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "parser internal bug")
}
}
}
impl fmt::Debug for Constraint {
- fn fmt(&self, formatter: &mut fmt::Formatter) -> Result<(), fmt::Error> {
+ fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result {
write!(
formatter,
"({:?}: {:?} @ {:?}) due to {:?}",
}
impl<'a, 'b, 'tcx> fmt::Debug for Elaborator<'a, 'b, 'tcx> {
- fn fmt(&self, _f: &mut fmt::Formatter) -> Result<(), fmt::Error> {
+ fn fmt(&self, _f: &mut fmt::Formatter) -> fmt::Result {
Ok(())
}
}
}
fn render_implementor(cx: &Context, implementor: &Impl, w: &mut fmt::Formatter,
- implementor_dups: &FxHashMap<&str, (DefId, bool)>) -> Result<(), fmt::Error> {
+ implementor_dups: &FxHashMap<&str, (DefId, bool)>) -> fmt::Result {
write!(w, "<li><table class='table-display'><tbody><tr><td><code>")?;
// If there's already another implementor that has the same abbridged name, use the
// full path, for example in `std::iter::ExactSizeIterator`
fn render_impls(cx: &Context, w: &mut fmt::Formatter,
traits: &[&&Impl],
- containing_item: &clean::Item) -> Result<(), fmt::Error> {
+ containing_item: &clean::Item) -> fmt::Result {
for i in traits {
let did = i.trait_did().unwrap();
let assoc_link = AssocItemLink::GotoSource(did, &i.inner_impl().provided_trait_methods);
#[stable(feature = "rust1", since = "1.0.0")]
impl fmt::Debug for PathBuf {
- fn fmt(&self, formatter: &mut fmt::Formatter) -> Result<(), fmt::Error> {
+ fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result {
fmt::Debug::fmt(&**self, formatter)
}
}
}
impl fmt::Debug for Error {
- fn fmt(&self, f: &mut fmt::Formatter) -> result::Result<(), fmt::Error> {
+ fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
f.write_str(self.text())
}
}
impl fmt::Display for Error {
- fn fmt(&self, f: &mut fmt::Formatter) -> result::Result<(), fmt::Error> {
+ fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
f.write_str(self.text())
}
}
/// Example: `U+1F4A9`
impl fmt::Debug for CodePoint {
#[inline]
- fn fmt(&self, formatter: &mut fmt::Formatter) -> Result<(), fmt::Error> {
+ fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result {
write!(formatter, "U+{:04X}", self.value)
}
}
/// Example: `"a\u{D800}"` for a string with code points [U+0061, U+D800]
impl fmt::Debug for Wtf8Buf {
#[inline]
- fn fmt(&self, formatter: &mut fmt::Formatter) -> Result<(), fmt::Error> {
+ fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result {
fmt::Debug::fmt(&**self, formatter)
}
}
}
impl<'a> std::fmt::Debug for StrCursor<'a> {
- fn fmt(&self, fmt: &mut std::fmt::Formatter) -> Result<(), std::fmt::Error> {
+ fn fmt(&self, fmt: &mut std::fmt::Formatter) -> std::fmt::Result {
write!(fmt, "StrCursor({:?} | {:?})", self.slice_before(), self.slice_after())
}
}
struct SlowFmt(u32);
impl fmt::Debug for SlowFmt {
- fn fmt(&self, f: &mut fmt::Formatter) -> Result<(), fmt::Error> {
+ fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
thread::sleep_ms(3);
self.0.fmt(f)
}
}
impl fmt::Display for U {
- fn fmt(&self, f: &mut fmt::Formatter) -> Result<(), fmt::Error> {
+ fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
unsafe { write!(f, "Oh hai {}", self.a) }
}
}