item_path_str -> def_path_str

This commit is contained in:
flip1995 2019-03-15 23:43:42 +01:00
parent 31435cd7f5
commit dcbd3aefa2
No known key found for this signature in database
GPG Key ID: 693086869D506637
2 changed files with 3 additions and 3 deletions

View File

@ -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(),
}

View File

@ -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();