Skip to content

Commit 0cacd37

Browse files
bors[bot]japaric
andauthored
Merge #382
382: impl Format for Infallible r=jonas-schievink a=japaric Co-authored-by: Jorge Aparicio <jorge.aparicio@ferrous-systems.com>
2 parents 8d116a3 + 1bf620b commit 0cacd37

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

src/impls.rs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -450,3 +450,11 @@ mod if_alloc {
450450
}
451451
}
452452
}
453+
454+
impl Format for core::convert::Infallible {
455+
#[inline]
456+
fn format(&self, _: Formatter) {
457+
// type cannot be instantiated so nothing to do here
458+
match *self {}
459+
}
460+
}

0 commit comments

Comments
 (0)