Commit Graph

9 Commits

Author SHA1 Message Date
Tomasz Miąsko
b48870b451 Replace Body::basic_blocks() with field access 2022-08-26 14:27:08 +02:00
Jakob Degen
7547084ff6 Add option to mir::MutVisitor to not invalidate CFG.
This also applies that option to some uses of the visitor
2022-08-09 01:51:10 -07:00
Tomasz Miąsko
39d9c1cb1f Move predecessors from Body to BasicBlocks 2022-07-07 08:11:49 +02:00
lcnr
cf9c0a5935 cleanup mir visitor for rustc::pass_by_value 2022-07-01 16:21:21 +02:00
Yuri Astrakhan
5160f8f843 Spellchecking compiler comments
This PR cleans up the rest of the spelling mistakes in the compiler comments. This PR does not change any literal or code spelling issues.
2022-03-30 15:14:15 -04:00
est31
2ef8af6619 Adopt let else in more places 2022-02-19 17:27:43 +01:00
Scott McMurray
a124924061 Remove in_band_lifetimes from rustc_mir_transform
This one is a heavy `'tcx` user.

Two 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>) {
```
2021-12-07 21:04:40 -08:00
Dylan MacKenzie
fd18b45e11 Update passes with new interface 2021-12-02 17:31:38 -08:00
Camille GILLOT
bba4be681d Move rustc_mir::transform to rustc_mir_transform. 2021-09-07 00:43:14 +02:00