diff options
| author | Deadbeef <ent3rm4n@gmail.com> | 2024-06-14 12:16:15 +0000 |
|---|---|---|
| committer | Deadbeef <ent3rm4n@gmail.com> | 2024-06-28 10:57:35 +0000 |
| commit | 72e8244e64b284f8f93a778e804b59c10305fc59 (patch) | |
| tree | 753376943d4ce70ac6da8f56f7e24b3e4f000e97 /compiler/rustc_const_eval | |
| parent | 99f77a2eda555b50b518f74823ab636a20efb87f (diff) | |
| download | rust-72e8244e64b284f8f93a778e804b59c10305fc59.tar.gz rust-72e8244e64b284f8f93a778e804b59c10305fc59.zip | |
implement new effects desugaring
Diffstat (limited to 'compiler/rustc_const_eval')
| -rw-r--r-- | compiler/rustc_const_eval/src/const_eval/fn_queries.rs | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/compiler/rustc_const_eval/src/const_eval/fn_queries.rs b/compiler/rustc_const_eval/src/const_eval/fn_queries.rs index 8c66888d100..7acd08e0cce 100644 --- a/compiler/rustc_const_eval/src/const_eval/fn_queries.rs +++ b/compiler/rustc_const_eval/src/const_eval/fn_queries.rs @@ -42,10 +42,7 @@ fn constness(tcx: TyCtxt<'_>, def_id: LocalDefId) -> hir::Constness { | hir::Node::ImplItem(hir::ImplItem { kind: hir::ImplItemKind::Const(..), .. }) => { hir::Constness::Const } - hir::Node::Item(hir::Item { kind: hir::ItemKind::Impl(_), .. }) => tcx - .generics_of(def_id) - .host_effect_index - .map_or(hir::Constness::NotConst, |_| hir::Constness::Const), + hir::Node::Item(hir::Item { kind: hir::ItemKind::Impl(impl_), .. }) => impl_.constness, hir::Node::ForeignItem(hir::ForeignItem { kind: hir::ForeignItemKind::Fn(..), .. }) => { // Intrinsics use `rustc_const_{un,}stable` attributes to indicate constness. All other // foreign items cannot be evaluated at compile-time. |
