rust-lang / rust

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

Stop using `in_band_lifetimes` in compiler crates #91867

Closed scottmcm closed 2 years ago

scottmcm commented 2 years ago

With more than 50% of the sign-offs needed in https://github.com/rust-lang/rust/issues/44524#issuecomment-988260475 to remove the feature entirely (EDIT: And now in FCP), I think it's now fine to start updating the compiler code to stop using the nightly feature.

Here are the crates currently using it:

I've marked this E-easy as it's very mechanical work. If you're interested in helping out:

If you'd like to see how these PRs end up looking, here's two that I made earlier:

(They're also listed in the checklist above.)

LegionMammal978 commented 2 years ago

I've worked on rustc_infer (#91878), rustc_codegen_ssa (#91885), rustc_const_eval (#91887), rustc_mir_dataflow (#91922), rustc_query_impl (#91923), rustc_privacy (#91925), and rustc_codegen_llvm (#91931).

bugadani commented 2 years ago

I can give rustc_borrowck a try (#91879)

Patrick-Poitras commented 2 years ago

I'll try with rustc_typeck. 243 errors fixed! (#91882)

pitaj commented 2 years ago

I'll take rustc_hir (#91893) and rustc_incremental (#91894).

I'll also take rustc_monomorphize (#91895) and rustc_passes (#91896).

SylvanB commented 2 years ago

I'll take rustc_symbol_mangling (#91901). Also taking rustc_trait_selection (#91904). Also taking rustc_metadata (#91926)

lameferret commented 2 years ago

will try library\proc_macro, PR: #91906

also compiler\rustc_traits, PR: #91929

compiler\rustc_trait_selection, PR: #91927

compiler\rustc_middle : Having a hard time with this one, if anyone wants they can pick it up.

Patrick-Poitras commented 2 years ago

I'll give rust-middle a try.

Patrick-Poitras commented 2 years ago

I'm going to be yielding rust-middle to the queue again. Anyone can take it, but I'm the second person to return this to the queue due to some difficult structures. I'd recommend someone that has worked with rustc_middle before, or at least a more experienced contributor than myself.

It has a lot of the small detail work that we would find with the other removals, but there's a few pieces that are entirely out of my grasp, and may require the work of someone with a certain level of expertise. There's a proc macro derived in many of the structs used that uses an inband-lifetime, and several other macros that use a lifetime for some of the structs but not others. Sorting through this requires more-than-surface-understanding of the module.

Aaron1011 commented 2 years ago

I'll take rustc_middle

scottmcm commented 2 years ago

Thanks everyone for jumping on this so quickly! It looks like all the crates have been picked up, so I've removed the E- tags for now so it stops showing up in queries for people looking for things.

scottmcm commented 2 years ago

Looks like these have all landed, so I'll close this.

Thanks for the help, everyone!