mirror of
https://github.com/rust-lang/rust-clippy
synced 2024-11-27 07:00:55 +00:00
item_path_str -> def_path_str
This commit is contained in:
parent
31435cd7f5
commit
dcbd3aefa2
2 changed files with 3 additions and 3 deletions
|
@ -134,7 +134,7 @@ fn get_ufcs_type_name(
|
|||
|
||||
if let Some(trait_id) = cx.tcx.trait_of_item(method_def_id) {
|
||||
if match_borrow_depth(expected_type_of_self, actual_type_of_self) {
|
||||
return Some(cx.tcx.item_path_str(trait_id));
|
||||
return Some(cx.tcx.def_path_str(trait_id));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -174,7 +174,7 @@ fn match_types(lhs: &ty::TyKind<'_>, rhs: &ty::TyKind<'_>) -> bool {
|
|||
|
||||
fn get_type_name(cx: &LateContext<'_, '_>, kind: &ty::TyKind<'_>) -> String {
|
||||
match kind {
|
||||
ty::Adt(t, _) => cx.tcx.item_path_str(t.did),
|
||||
ty::Adt(t, _) => cx.tcx.def_path_str(t.did),
|
||||
ty::Ref(_, r, _) => get_type_name(cx, &r.sty),
|
||||
_ => kind.to_string(),
|
||||
}
|
||||
|
|
|
@ -539,7 +539,7 @@ fn check_wild_enum_match(cx: &LateContext<'_, '_>, ex: &Expr, arms: &[Arm]) {
|
|||
String::new()
|
||||
};
|
||||
// This path assumes that the enum type is imported into scope.
|
||||
format!("{}{}{}", ident_str, cx.tcx.item_path_str(v.did), suffix)
|
||||
format!("{}{}{}", ident_str, cx.tcx.def_path_str(v.did), suffix)
|
||||
})
|
||||
.collect();
|
||||
|
||||
|
|
Loading…
Reference in a new issue