diff options
| author | Nilstrieb <48135649+Nilstrieb@users.noreply.github.com> | 2023-02-26 21:50:19 +0000 |
|---|---|---|
| committer | Nilstrieb <48135649+Nilstrieb@users.noreply.github.com> | 2023-02-27 13:30:44 +0000 |
| commit | 5f593da4e6976fe27f7cd31ce0fb9a9293b3a00b (patch) | |
| tree | 72a1620a46caf8b13f65c543190f3481584082ba /compiler/rustc_const_eval/src/lib.rs | |
| parent | 49b9cc5139dd4d11ef78dc08c1f9170de5b1ca39 (diff) | |
| download | rust-5f593da4e6976fe27f7cd31ce0fb9a9293b3a00b.tar.gz rust-5f593da4e6976fe27f7cd31ce0fb9a9293b3a00b.zip | |
Unify all validity check intrinsics
Also merges the inhabitedness check into the query to further unify the code paths.
Diffstat (limited to 'compiler/rustc_const_eval/src/lib.rs')
| -rw-r--r-- | compiler/rustc_const_eval/src/lib.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/compiler/rustc_const_eval/src/lib.rs b/compiler/rustc_const_eval/src/lib.rs index 092a7dc3d3b..ed9efe568fb 100644 --- a/compiler/rustc_const_eval/src/lib.rs +++ b/compiler/rustc_const_eval/src/lib.rs @@ -61,7 +61,7 @@ pub fn provide(providers: &mut Providers) { let (param_env, value) = param_env_and_value.into_parts(); const_eval::deref_mir_constant(tcx, param_env, value) }; - providers.check_validity_of_init = |tcx, (init_kind, param_env_and_ty)| { - util::might_permit_raw_init(tcx, init_kind, param_env_and_ty) + providers.check_validity_requirement = |tcx, (init_kind, param_env_and_ty)| { + util::check_validity_requirement(tcx, init_kind, param_env_and_ty) }; } |
