Rollup merge of #71330 - ecstatic-morse:const-qualif-lazy, r=oli-obk
Only run dataflow for const qualification if type-based check would fail This is the optimization discussed in https://github.com/rust-lang/rust/issues/49146#issuecomment-614012476. We wait for `Qualif::in_any_value_of_ty` to return `true` before running dataflow. For bodies that deal mostly with primitive types, this will avoid running dataflow at all during const qualification. This also removes the `BitSet` used to cache `in_any_value_of_ty` for each local, which was only necessary for an old version of #64470 that also handled promotability.
Showing
想要评论请 注册 或 登录