support const_evaluatable_checked across crate boundaries

This commit is contained in:
Bastian Kauschke 2020-09-11 21:16:16 +02:00
parent 82ebbd7d6b
commit 30ff1ef3d0
14 changed files with 157 additions and 2 deletions

View file

@ -553,7 +553,7 @@ pub fn provide(providers: &mut ty::query::Providers) {
type_implements_trait,
subst_and_check_impossible_predicates,
mir_abstract_const: |tcx, def_id| {
let def_id = def_id.as_local()?; // We do not store failed AbstractConst's.
let def_id = def_id.expect_local();
if let Some(def) = ty::WithOptConstParam::try_lookup(def_id, tcx) {
tcx.mir_abstract_const_of_const_arg(def)
} else {