From bfc434b6d0e64dab88def4c5282eeb4a294faf76 Mon Sep 17 00:00:00 2001 From: Alan Egerton Date: Wed, 1 Dec 2021 00:55:57 +0000 Subject: Reduce boilerplate around infallible folders --- compiler/rustc_const_eval/src/lib.rs | 1 - compiler/rustc_const_eval/src/transform/validate.rs | 3 +-- 2 files changed, 1 insertion(+), 3 deletions(-) (limited to 'compiler/rustc_const_eval/src') diff --git a/compiler/rustc_const_eval/src/lib.rs b/compiler/rustc_const_eval/src/lib.rs index 0d36466f6e3..f308e764e86 100644 --- a/compiler/rustc_const_eval/src/lib.rs +++ b/compiler/rustc_const_eval/src/lib.rs @@ -23,7 +23,6 @@ Rust MIR: a lowered representation of Rust. #![feature(trusted_len)] #![feature(trusted_step)] #![feature(try_blocks)] -#![feature(unwrap_infallible)] #![recursion_limit = "256"] #[macro_use] diff --git a/compiler/rustc_const_eval/src/transform/validate.rs b/compiler/rustc_const_eval/src/transform/validate.rs index c86c8f81dbd..b4bb6390db4 100644 --- a/compiler/rustc_const_eval/src/transform/validate.rs +++ b/compiler/rustc_const_eval/src/transform/validate.rs @@ -94,8 +94,7 @@ pub fn equal_up_to_regions( // Leave consts and types unchanged. ct_op: |ct| ct, ty_op: |ty| ty, - }) - .into_ok(), + }), ) }; tcx.infer_ctxt().enter(|infcx| infcx.can_eq(param_env, normalize(src), normalize(dest)).is_ok()) -- cgit 1.4.1-3-g733a5