From 366f14aadd93b8ce050cd16eee1f46ea34e13e77 Mon Sep 17 00:00:00 2001 From: Tad Hardesty Date: Tue, 16 Feb 2021 17:41:58 -0800 Subject: [PATCH] Disable forbidding of unreachable_patterns in editor keychord handler --- src/editor/main.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/editor/main.rs b/src/editor/main.rs index f7340a47..b24850d8 100644 --- a/src/editor/main.rs +++ b/src/editor/main.rs @@ -1147,7 +1147,8 @@ impl EditorScene { self.target_tile = self.tile_under(self.last_mouse_pos); } - #[deny(unreachable_patterns)] + // Commented out due to https://github.com/rust-lang/rust/issues/82012 + //#[deny(unreachable_patterns)] fn chord(&mut self, ctrl: bool, shift: bool, alt: bool, key: Key) { use Key::*; macro_rules! k { @@ -1163,7 +1164,6 @@ impl EditorScene { (@[$ctrl:pat, $shift:pat, $alt:pat] Alt + $($rest:tt)*) => { k!(@[$ctrl, $shift, true] $($rest)*) }; - (@$($rest:tt)*) => { error }; ($($rest:tt)*) => { k!(@[false, false, false] $($rest)*) };