diff options
| author | bors <bors@rust-lang.org> | 2023-08-08 19:23:41 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2023-08-08 19:23:41 +0000 |
| commit | f88a8b71cebb730cbd5058c45ebcae1d4d9be377 (patch) | |
| tree | cb6151402989f498dd13def70bbab6d54dc50878 /compiler/rustc_const_eval/src/const_eval | |
| parent | f525bb4e2afac6d2491a86c178aa98e3f3931130 (diff) | |
| parent | 057be381c60bf9b5c26497a42ad51917c3027b65 (diff) | |
| download | rust-f88a8b71cebb730cbd5058c45ebcae1d4d9be377.tar.gz rust-f88a8b71cebb730cbd5058c45ebcae1d4d9be377.zip | |
Auto merge of #114545 - fee1-dead-contrib:lower-impl-effect, r=oli-obk
correctly lower `impl const` to bind to host effect param r? `@oli-obk`
Diffstat (limited to 'compiler/rustc_const_eval/src/const_eval')
| -rw-r--r-- | compiler/rustc_const_eval/src/const_eval/fn_queries.rs | 2 |
1 files changed, 1 insertions, 1 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 cc39387c41f..4ee4ebbb9e4 100644 --- a/compiler/rustc_const_eval/src/const_eval/fn_queries.rs +++ b/compiler/rustc_const_eval/src/const_eval/fn_queries.rs @@ -40,7 +40,7 @@ fn constness(tcx: TyCtxt<'_>, def_id: LocalDefId) -> hir::Constness { | hir::Node::AnonConst(_) | hir::Node::ConstBlock(_) | hir::Node::ImplItem(hir::ImplItem { kind: hir::ImplItemKind::Const(..), .. }) => hir::Constness::Const, - hir::Node::Item(hir::Item { kind: hir::ItemKind::Impl(impl_), .. }) => impl_.constness, + 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::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. |
