mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-22 23:04:33 +00:00
Add rationale for RemoveUnneededDrops
...since its name is very close to `RemoveUninitDrops`.
This commit is contained in:
parent
4f7605b6fd
commit
ce2959da97
@ -1,4 +1,8 @@
|
||||
//! This pass replaces a drop of a type that does not need dropping, with a goto
|
||||
//! This pass replaces a drop of a type that does not need dropping, with a goto.
|
||||
//!
|
||||
//! When the MIR is built, we check `needs_drop` before emitting a `Drop` for a place. This pass is
|
||||
//! useful because (unlike MIR building) it runs after type checking, so it can make use of
|
||||
//! `Reveal::All` to provide more precies type information.
|
||||
|
||||
use crate::MirPass;
|
||||
use rustc_middle::mir::*;
|
||||
|
Loading…
Reference in New Issue
Block a user