Add a useful comment about PromoteTemps
.
This was non-obvious to me.
This commit is contained in:
parent
e26692d559
commit
51e1c3958d
1 changed files with 1 additions and 0 deletions
|
@ -36,6 +36,7 @@ use tracing::{debug, instrument};
|
||||||
/// newly created `Constant`.
|
/// newly created `Constant`.
|
||||||
#[derive(Default)]
|
#[derive(Default)]
|
||||||
pub(super) struct PromoteTemps<'tcx> {
|
pub(super) struct PromoteTemps<'tcx> {
|
||||||
|
// Must use `Cell` because `run_pass` takes `&self`, not `&mut self`.
|
||||||
pub promoted_fragments: Cell<IndexVec<Promoted, Body<'tcx>>>,
|
pub promoted_fragments: Cell<IndexVec<Promoted, Body<'tcx>>>,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue