Skip to content

Commit 76ca50d

Browse files
committed
Auto merge of #130950 - compiler-errors:yeet-eval, r=BoxyUwU
Continue to get rid of `ty::Const::{try_}eval*` This PR mostly does: * Removes all of the `try_eval_*` and `eval_*` helpers from `ty::Const`, and replace their usages with `try_to_*`. * Remove `ty::Const::eval`. * Rename `ty::Const::normalize` to `ty::Const::normalize_internal`. This function is still used in the normalization code itself. * Fix some weirdness around the `TransmuteFrom` goal. I'm happy to split it out further; for example, I could probably land the first part which removes the helpers, or the changes to codegen which are more obvious than the changes to tools. r? BoxyUwU Part of rust-lang/rust#130704
2 parents ce8da11 + 1d635fe commit 76ca50d

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

src/intrinsics/simd.rs

+4-5
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
use either::Either;
22
use rustc_apfloat::{Float, Round};
3-
use rustc_middle::ty::FloatTy;
4-
use rustc_middle::ty::layout::{HasParamEnv, LayoutOf};
5-
use rustc_middle::{mir, ty};
3+
use rustc_middle::ty::layout::LayoutOf;
4+
use rustc_middle::{mir, ty, ty::FloatTy};
65
use rustc_span::{Symbol, sym};
76
use rustc_target::abi::{Endian, HasDataLayout};
87

@@ -633,9 +632,9 @@ pub trait EvalContextExt<'tcx>: crate::MiriInterpCxExt<'tcx> {
633632

634633
let index = generic_args[2]
635634
.expect_const()
636-
.eval(*this.tcx, this.param_env(), this.tcx.span)
635+
.try_to_valtree()
637636
.unwrap()
638-
.1
637+
.0
639638
.unwrap_branch();
640639
let index_len = index.len();
641640

0 commit comments

Comments
 (0)