rust-lang / types-team

Home of the "types team", affiliated with the compiler and lang teams.
https://rust-lang.github.io/types-team/
Apache License 2.0
95 stars 19 forks source link

Instantiate implied bounds explicitly #117

Open nikomatsakis opened 1 year ago

nikomatsakis commented 1 year ago

There are a number of soundness holes caused, directly or indirectly, by the way that we handle implied region bounds on functions. The current codebase tries to hack them in "on the side" rather than explicitly instantiating where-clauses in the compiler's logic. Converting implied bounds to be explicit is conceptually easy, but it requires supporting where-clauses (and implied bounds) attached to higher-ranked binders.

Requires #116

Related unsoundness bugs: