Skip to content

Commit 9c1a916

Browse files
committed
cleanup hir hack
1 parent 626649f commit 9c1a916

File tree

1 file changed

+1
-7
lines changed

1 file changed

+1
-7
lines changed

compiler/rustc_hir/src/hir.rs

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3234,12 +3234,7 @@ impl<'hir> Node<'hir> {
32343234
}
32353235
}
32363236

3237-
/// Returns `Constness::Const` when this node is a const fn/impl/item,
3238-
///
3239-
/// HACK(fee1-dead): or an associated type in a trait. This works because
3240-
/// only typeck cares about const trait predicates, so although the predicates
3241-
/// query would return const predicates when it does not need to be const,
3242-
/// it wouldn't have any effect.
3237+
/// Returns `Constness::Const` when this node is a const fn/impl/item.
32433238
pub fn constness_for_typeck(&self) -> Constness {
32443239
match self {
32453240
Node::Item(Item {
@@ -3258,7 +3253,6 @@ impl<'hir> Node<'hir> {
32583253

32593254
Node::Item(Item { kind: ItemKind::Const(..), .. })
32603255
| Node::TraitItem(TraitItem { kind: TraitItemKind::Const(..), .. })
3261-
| Node::TraitItem(TraitItem { kind: TraitItemKind::Type(..), .. })
32623256
| Node::ImplItem(ImplItem { kind: ImplItemKind::Const(..), .. }) => Constness::Const,
32633257

32643258
_ => Constness::NotConst,

0 commit comments

Comments
 (0)