Skip to content

Commit cb29cb9

Browse files
committed
fix: add comment abt early return
1 parent 116daa3 commit cb29cb9

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

‎compiler/rustc_ty_utils/src/instance.rs‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -171,6 +171,9 @@ fn resolve_associated_item<'tcx>(
171171
);
172172
}
173173

174+
// `Destruct` isn't object-safe and has no specialization concerns here,
175+
// so the checks below (dyn-Trait overlap, defaultness, args-compatibility,
176+
// compare_impl_item) don't apply so we build the Instance directly.
174177
debug!("Got user Destruct impl");
175178
return Ok(Some(Instance {
176179
def: ty::InstanceKind::Item(leaf_def.item.def_id),

0 commit comments

Comments
 (0)