We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 15beeeb commit f09a177Copy full SHA for f09a177
src/librustc/ty/instance.rs
@@ -166,10 +166,14 @@ impl<'tcx> InstanceDef<'tcx> {
166
return true
167
}
168
if let ty::InstanceDef::DropGlue(..) = *self {
169
- // Drop glue wants to be instantiated at every codegen
+ // Drop glue generally wants to be instantiated at every codegen
170
// unit, but without an #[inline] hint. We should make this
171
// available to normal end-users.
172
- return true
+ //
173
+ // When compiling with incremental, we can generate a lot of
174
+ // codegen units. Including drop glue into all of them has a
175
+ // considerable compile time cost.
176
+ return tcx.sess.opts.incremental.is_none();
177
178
tcx.codegen_fn_attrs(self.def_id()).requests_inline()
179
0 commit comments