rust/compiler/rustc_mir_transform
Matthias Krüger 90690dae69
Rollup merge of #91638 - scottmcm:less-inband-2-of-28, r=petrochenkov
Remove `in_band_lifetimes` from `rustc_mir_transform`

Like #91580, this was inspired by the conversation in #44524 about possibly removing the feature from the compiler.  This crate is a heavy `'tcx` user, so is a nice case study.

r? ``@petrochenkov``

Three interesting ones:

This one had the `'tcx` declared on the function, despite the trait taking a `'tcx`:
```diff
-impl Visitor<'_> for UsedLocals {
+impl<'tcx> Visitor<'tcx> for UsedLocals {
     fn visit_statement(&mut self, statement: &Statement<'tcx>, location: Location) {
```

This one use in-band for one, and underscore for the other:
```diff
-pub fn remove_dead_blocks(tcx: TyCtxt<'tcx>, body: &mut Body<'_>) {
+pub fn remove_dead_blocks<'tcx>(tcx: TyCtxt<'tcx>, body: &mut Body<'tcx>) {
```

A spurious name, since there's no single-use-lifetime warning:
```diff
-pub fn run_passes(tcx: TyCtxt<'tcx>, body: &'mir mut Body<'tcx>, passes: &[&dyn MirPass<'tcx>]) {
+pub fn run_passes<'tcx>(tcx: TyCtxt<'tcx>, body: &mut Body<'tcx>, passes: &[&dyn MirPass<'tcx>]) {
```
2021-12-08 11:09:01 +01:00
..
src Rollup merge of #91638 - scottmcm:less-inband-2-of-28, r=petrochenkov 2021-12-08 11:09:01 +01:00
Cargo.toml Remove re-export. 2021-10-03 16:08:54 +02:00