rust-lang / rust

Empowering everyone to build reliable and efficient software.
https://www.rust-lang.org
Other
98.9k stars 12.78k forks source link

Only determine impl-trait desugaring kind once #96529

Open cjgillot opened 2 years ago

cjgillot commented 2 years ago

impl-trait can either be desugared as a generic parameter (universal), as an opaque type (existential), or forbidden. This desugaring is currently on the AST in two places: def_collector and ast_lowering. The two logic are not consistent with one another. When this happens, ast_lowering is right.

dyn Trait<T: Bound> sometimes desugars to dyn Trait<T = impl Bound>, and sometimes does not.

We should only determine the desugaring once. This can be achieved by:

Please reach out on Zulip for any question.

randomicon00 commented 2 years ago

@rustbot claim

vE5li commented 6 months ago

Is anyone working on this? If not I would like to take a look

randomicon00 commented 6 months ago

The tasks are interlinked, from my understanding, and the version that I have has one, two, and three almost done and I stopped at the last item. In fact, I am stuck there, give me like a week or two so I refresh my memory and get an exact idea about what's blocking me on that last item?