Skip to content

Commit 7a51cf1

Browse files
committed
Panic on trying to find non-feature incompleteness
1 parent 11ebd80 commit 7a51cf1

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

compiler/rustc_feature/src/active.rs

+4-1
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,10 @@ macro_rules! declare_features {
8282
$(
8383
sym::$feature => declare_features!(__status_to_bool $status),
8484
)*
85-
_ => false,
85+
// accepted and removed features aren't in this file but are never incomplete
86+
_ if self.declared_lang_features.iter().any(|f| f.0 == feature) => false,
87+
_ if self.declared_lib_features.iter().any(|f| f.0 == feature) => false,
88+
_ => panic!("`{}` was not listed in `declare_features`", feature),
8689
}
8790
}
8891
}

0 commit comments

Comments
 (0)