From 7a51cf118650aa737e7aa20aeab1377aac4866c4 Mon Sep 17 00:00:00 2001 From: Smitty Date: Mon, 28 Jun 2021 18:37:54 -0400 Subject: [PATCH] Panic on trying to find non-feature incompleteness --- compiler/rustc_feature/src/active.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/compiler/rustc_feature/src/active.rs b/compiler/rustc_feature/src/active.rs index d0600918c82..f045a75cdc8 100644 --- a/compiler/rustc_feature/src/active.rs +++ b/compiler/rustc_feature/src/active.rs @@ -82,7 +82,10 @@ macro_rules! declare_features { $( sym::$feature => declare_features!(__status_to_bool $status), )* - _ => false, + // accepted and removed features aren't in this file but are never incomplete + _ if self.declared_lang_features.iter().any(|f| f.0 == feature) => false, + _ if self.declared_lib_features.iter().any(|f| f.0 == feature) => false, + _ => panic!("`{}` was not listed in `declare_features`", feature), } } }