mirror of
https://github.com/rust-lang/rust.git
synced 2025-11-01 13:34:38 +00:00
permit drop impls with generic constants in where clauses Fixes #79248 `==` is not sufficient to check for equality between unevaluated consts which causes the above issue because the const in `[(); N - 1]:` on the impl and the const in `[(); N - 1]:` on the struct def are not seen as equal. Any predicate that can contain an unevaluated const cant use `==` here as it will cause us to incorrectly emit an error. I dont know much about chalk but it seems like we ought to be relating the `TypeWellFormedFromEnv` instead of `==` as it contains a `Ty` so I added that too... r? ``````@lcnr``````
For high-level intro to how type checking works in rustc, see the type checking chapter of the rustc dev guide.