rust-lang / trait-system-refactor-initiative

The Rustc Trait System Refactor Initiative
21 stars 0 forks source link

`has_no_inference_or_external_constraints` does not detect pulled down universes or placeholders #117

Open lcnr opened 4 months ago

lcnr commented 4 months ago

https://github.com/rust-lang/rust/blob/c1f62a7c35349438ea9728abbe1bcf1cebd426b7/compiler/rustc_trait_selection/src/solve/mod.rs#L80-L86 the var_values is identity check does not consider variables with lowered universes.

From what I can tell this also doesn't detect when we've replaced inference variables with placeholders.

This is incomplete and therefore unsound during coherence