mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-22 06:44:35 +00:00
Add a useful comment about PromoteTemps
.
This was non-obvious to me.
This commit is contained in:
parent
e26692d559
commit
51e1c3958d
@ -36,6 +36,7 @@ use tracing::{debug, instrument};
|
||||
/// newly created `Constant`.
|
||||
#[derive(Default)]
|
||||
pub(super) struct PromoteTemps<'tcx> {
|
||||
// Must use `Cell` because `run_pass` takes `&self`, not `&mut self`.
|
||||
pub promoted_fragments: Cell<IndexVec<Promoted, Body<'tcx>>>,
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user