|
10 | 10 |
|
11 | 11 | //! This module provides two passes:
|
12 | 12 | //!
|
13 |
| -//! - [CleanAscribeUserType], that replaces all |
14 |
| -//! [StatementKind::AscribeUserType] statements with [StatementKind::Nop]. |
15 |
| -//! - [CleanFakeReadsAndBorrows], that replaces all [FakeRead] statements and |
16 |
| -//! borrows that are read by [FakeReadCause::ForMatchGuard] fake reads with |
17 |
| -//! [StatementKind::Nop]. |
| 13 | +//! - [`CleanAscribeUserType`], that replaces all [`AscribeUserType`] |
| 14 | +//! statements with [`Nop`]. |
| 15 | +//! - [`CleanFakeReadsAndBorrows`], that replaces all [`FakeRead`] statements |
| 16 | +//! and borrows that are read by [`ForMatchGuard`] fake reads with [`Nop`]. |
18 | 17 | //!
|
19 |
| -//! The [CleanFakeReadsAndBorrows] "pass" is actually implemented as two |
| 18 | +//! The `CleanFakeReadsAndBorrows` "pass" is actually implemented as two |
20 | 19 | //! traversals (aka visits) of the input MIR. The first traversal,
|
21 |
| -//! [DeleteAndRecordFakeReads], deletes the fake reads and finds the temporaries |
22 |
| -//! read by [ForMatchGuard] reads, and [DeleteFakeBorrows] deletes the |
23 |
| -//! initialization of those temporaries. |
| 20 | +//! [`DeleteAndRecordFakeReads`], deletes the fake reads and finds the |
| 21 | +//! temporaries read by [`ForMatchGuard`] reads, and [`DeleteFakeBorrows`] |
| 22 | +//! deletes the initialization of those temporaries. |
| 23 | +//! |
| 24 | +//! [`CleanAscribeUserType`]: cleanup_post_borrowck::CleanAscribeUserType |
| 25 | +//! [`CleanFakeReadsAndBorrows`]: cleanup_post_borrowck::CleanFakeReadsAndBorrows |
| 26 | +//! [`DeleteAndRecordFakeReads`]: cleanup_post_borrowck::DeleteAndRecordFakeReads |
| 27 | +//! [`DeleteFakeBorrows`]: cleanup_post_borrowck::DeleteFakeBorrows |
| 28 | +//! [`AscribeUserType`]: rustc::mir::StatementKind::AscribeUserType |
| 29 | +//! [`Nop`]: rustc::mir::StatementKind::Nop |
| 30 | +//! [`FakeRead`]: rustc::mir::StatementKind::FakeRead |
| 31 | +//! [`ForMatchGuard`]: rustc::mir::FakeReadCause::ForMatchGuard |
24 | 32 |
|
25 | 33 | use rustc_data_structures::fx::FxHashSet;
|
26 | 34 |
|
|
0 commit comments