Skip to content

Commit dcbd3ae

Browse files
committed
item_path_str -> def_path_str
1 parent 31435cd commit dcbd3ae

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

clippy_lints/src/eta_reduction.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ fn get_ufcs_type_name(
134134

135135
if let Some(trait_id) = cx.tcx.trait_of_item(method_def_id) {
136136
if match_borrow_depth(expected_type_of_self, actual_type_of_self) {
137-
return Some(cx.tcx.item_path_str(trait_id));
137+
return Some(cx.tcx.def_path_str(trait_id));
138138
}
139139
}
140140

@@ -174,7 +174,7 @@ fn match_types(lhs: &ty::TyKind<'_>, rhs: &ty::TyKind<'_>) -> bool {
174174

175175
fn get_type_name(cx: &LateContext<'_, '_>, kind: &ty::TyKind<'_>) -> String {
176176
match kind {
177-
ty::Adt(t, _) => cx.tcx.item_path_str(t.did),
177+
ty::Adt(t, _) => cx.tcx.def_path_str(t.did),
178178
ty::Ref(_, r, _) => get_type_name(cx, &r.sty),
179179
_ => kind.to_string(),
180180
}

clippy_lints/src/matches.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -539,7 +539,7 @@ fn check_wild_enum_match(cx: &LateContext<'_, '_>, ex: &Expr, arms: &[Arm]) {
539539
String::new()
540540
};
541541
// This path assumes that the enum type is imported into scope.
542-
format!("{}{}{}", ident_str, cx.tcx.item_path_str(v.did), suffix)
542+
format!("{}{}{}", ident_str, cx.tcx.def_path_str(v.did), suffix)
543543
})
544544
.collect();
545545

0 commit comments

Comments
 (0)