We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
RemoveUnneededDrops
1 parent 4f7605b commit ce2959dCopy full SHA for ce2959d
compiler/rustc_mir_transform/src/remove_unneeded_drops.rs
@@ -1,4 +1,8 @@
1
-//! 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.
2
+//!
3
+//! When the MIR is built, we check `needs_drop` before emitting a `Drop` for a place. This pass is
4
+//! useful because (unlike MIR building) it runs after type checking, so it can make use of
5
+//! `Reveal::All` to provide more precies type information.
6
7
use crate::MirPass;
8
use rustc_middle::mir::*;
0 commit comments