Skip to content

Commit a5cf551

Browse files
author
Clar Charr
committed
Implement Error for !.
1 parent 11a3376 commit a5cf551

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

src/libstd/error.rs

+5
Original file line numberDiff line numberDiff line change
@@ -216,6 +216,11 @@ impl<'a> From<&'a str> for Box<Error> {
216216
}
217217
}
218218

219+
#[stable(feature = "never_error", since = "1.18.0")]
220+
impl Error for ! {
221+
fn description(&self) -> &str { *self }
222+
}
223+
219224
#[stable(feature = "rust1", since = "1.0.0")]
220225
impl Error for str::ParseBoolError {
221226
fn description(&self) -> &str { "failed to parse bool" }

src/libstd/lib.rs

+1
Original file line numberDiff line numberDiff line change
@@ -273,6 +273,7 @@
273273
#![feature(linkage)]
274274
#![feature(macro_reexport)]
275275
#![feature(needs_panic_runtime)]
276+
#![feature(never_type)]
276277
#![feature(num_bits_bytes)]
277278
#![feature(old_wrapping)]
278279
#![feature(on_unimplemented)]

0 commit comments

Comments
 (0)