Implement Error for !.

This commit is contained in:
Clar Charr 2017-03-15 23:07:28 -04:00
parent 11a33760ec
commit a5cf55125c
2 changed files with 6 additions and 0 deletions

View File

@ -216,6 +216,11 @@ impl<'a> From<&'a str> for Box<Error> {
}
}
#[stable(feature = "never_error", since = "1.18.0")]
impl Error for ! {
fn description(&self) -> &str { *self }
}
#[stable(feature = "rust1", since = "1.0.0")]
impl Error for str::ParseBoolError {
fn description(&self) -> &str { "failed to parse bool" }

View File

@ -273,6 +273,7 @@
#![feature(linkage)]
#![feature(macro_reexport)]
#![feature(needs_panic_runtime)]
#![feature(never_type)]
#![feature(num_bits_bytes)]
#![feature(old_wrapping)]
#![feature(on_unimplemented)]