1//! An uninhabitable type meaning it can never happen.
2//!
3//! To be replaced with `!` once it is stable.
4
5use std::error::Error;
6use std::fmt;
7
8#[derive(Debug)]
9pub(crate) enum Never {}
10
11impl fmt::Display for Never {
12 fn fmt(&self, _: &mut fmt::Formatter<'_>) -> fmt::Result {
13 match *self {}
14 }
15}
16
17impl Error for Never {
18 fn description(&self) -> &str {
19 match *self {}
20 }
21}
22