Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
.unwrap_or("");
let tz = match Timezone::from_str(timezone) {
Ok(tz) => tz,
- Err(x) => x, // x is of type !
+ Err(x) => match x { },
};
let (player, logentry) = ig.player_new(pl.st, tz, logentry)?;
(U{ pcs: vec![],
pub fn default<T:Default>() -> T { Default::default() }
+#[derive(Debug,Copy,Clone)]
pub enum Impossible { }
+display_as_debug!(Impossible);
pub type E = anyhow::Error;
pub type AE = anyhow::Error;
// SPDX-License-Identifier: AGPL-3.0-or-later
// There is NO WARRANTY.
-#![feature(never_type)]
#![feature(proc_macro_hygiene, decl_macro)]
#![feature(slice_strip)]
static MEMO: RwLock<MemoTable> = const_rwlock(None);
impl FromStr for Timezone {
- type Err = !;
- #[throws(!)]
+ type Err = Impossible;
+ #[throws(Impossible)]
fn from_str(name: &str) -> Self {
if name.is_empty() { return default() }