Skip to content

Commit dfb740f

Browse files
committed
removed unnecessary if
1 parent 1f532bf commit dfb740f

File tree

1 file changed

+0
-3
lines changed

1 file changed

+0
-3
lines changed

src/librustc/ty/mod.rs

-3
Original file line numberDiff line numberDiff line change
@@ -2681,9 +2681,6 @@ fn def_span<'a, 'tcx>(tcx: TyCtxt<'a, 'tcx, 'tcx>, def_id: DefId) -> Span {
26812681
/// return the ID of the trait that the trait item belongs to.
26822682
/// Otherwise, return `None`.
26832683
fn trait_of_item<'a, 'tcx>(tcx: TyCtxt<'a, 'tcx, 'tcx>, def_id: DefId) -> Option<DefId> {
2684-
if def_id.krate != LOCAL_CRATE {
2685-
return tcx.trait_of_item(def_id)
2686-
}
26872684
tcx.opt_associated_item(def_id)
26882685
.and_then(|associated_item| {
26892686
match associated_item.container {

0 commit comments

Comments
 (0)