From da9a588d4fda02c2fe6d52db651ec4c83b2b3e49 Mon Sep 17 00:00:00 2001 From: Matthias Krüger Date: Sun, 21 Feb 2021 18:11:27 +0100 Subject: remove redundant wrapping of return types of allow_internal_unstable() and rustc_allow_const_fn_unstable() --- compiler/rustc_passes/src/check_const.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'compiler/rustc_passes/src') diff --git a/compiler/rustc_passes/src/check_const.rs b/compiler/rustc_passes/src/check_const.rs index 9328f7cd9ec..da713566c31 100644 --- a/compiler/rustc_passes/src/check_const.rs +++ b/compiler/rustc_passes/src/check_const.rs @@ -106,7 +106,7 @@ impl<'tcx> CheckConstVisitor<'tcx> { // However, we cannot allow stable `const fn`s to use unstable features without an explicit // opt-in via `rustc_allow_const_fn_unstable`. attr::rustc_allow_const_fn_unstable(&tcx.sess, &tcx.get_attrs(def_id)) - .map_or(false, |mut features| features.any(|name| name == feature_gate)) + .any(|name| name == feature_gate) }; match required_gates { -- cgit 1.4.1-3-g733a5