]> git.lizzy.rs Git - rust.git/commit - src/tools/rustfmt
Auto merge of #79635 - lcnr:const-eval-idk, r=oli-obk
authorbors <bors@rust-lang.org>
Sun, 20 Dec 2020 00:50:46 +0000 (00:50 +0000)
committerbors <bors@rust-lang.org>
Sun, 20 Dec 2020 00:50:46 +0000 (00:50 +0000)
commit0c11b93f5a8914a40f619b0a1663baafe029d427
treee771970ae158f785df8990ab57e8371219ca3114
parentc1d58436614ad522e4db9113ac56d90ec4a95448
parent806c7281ec1905423aa4569d79940b59efc1905a
Auto merge of #79635 - lcnr:const-eval-idk, r=oli-obk

const_evaluatable_checked: fix occurs check

fixes #79615

this is kind of a hack because we use `TypeRelation` for both the `Generalizer` and the `ConstInferUnifier` but i am not sure if there is a useful way to disentangle this without unnecessarily duplicating some code.

The error in the added test is kind of unavoidable until we erase the unused substs of `ConstKind::Unevaluated`. We talked a bit about this in the cg lazy norm meeting (https://rust-lang.zulipchat.com/#narrow/stream/260443-project-const-generics/topic/lazy_normalization_consts)
compiler/rustc_infer/src/infer/combine.rs
compiler/rustc_middle/src/ty/relate.rs