We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 79f2439 commit 4d2a8c5Copy full SHA for 4d2a8c5
src/libcore/convert.rs
@@ -62,8 +62,9 @@ pub enum Infallible {}
62
63
#[unstable(feature = "try_from", issue = "33417")]
64
impl fmt::Display for Infallible {
65
- fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
66
- "an error of this type can never exist".fmt(f)
+ fn fmt(&self, _: &mut fmt::Formatter) -> fmt::Result {
+ match *self {
67
+ }
68
}
69
70
/// A cheap reference-to-reference conversion. Used to convert a value to a
src/libstd/error.rs
@@ -351,7 +351,8 @@ impl Error for char::ParseCharError {
351
352
impl Error for convert::Infallible {
353
fn description(&self) -> &str {
354
- "an error of this type can never exist"
355
356
357
358
0 commit comments