1
Fork 0

Always use const param envs for const eval.

Nothing else makes sense, and there is no "danger" in doing so, as it only does something if there are const bounds, which are unstable. This used to happen implicitly via the inferctxt before, which was much more fragile.
This commit is contained in:
Oli Scherer 2021-10-25 16:49:39 +00:00 committed by Deadbeef
parent a9a79f657c
commit f394bb57bb
No known key found for this signature in database
GPG key ID: 6D017A96D8E6C2F9
5 changed files with 12 additions and 0 deletions

View file

@ -3248,6 +3248,7 @@ impl<'hir> Node<'hir> {
Node::Item(Item { kind: ItemKind::Const(..), .. })
| Node::Item(Item { kind: ItemKind::Static(..), .. })
| Node::TraitItem(TraitItem { kind: TraitItemKind::Const(..), .. })
| Node::AnonConst(_)
| Node::ImplItem(ImplItem { kind: ImplItemKind::Const(..), .. }) => Constness::Const,
_ => Constness::NotConst,