mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-26 00:34:06 +00:00
Feed dog
This commit is contained in:
parent
180e07e99e
commit
4832a853c7
@ -147,7 +147,7 @@ fn get_ufcs_type_name(
|
||||
})
|
||||
}
|
||||
|
||||
fn match_borrow_depth(lhs: &ty::Ty<'_>, rhs: &ty::Ty<'_>) -> bool {
|
||||
fn match_borrow_depth(lhs: ty::Ty<'_>, rhs: ty::Ty<'_>) -> bool {
|
||||
match (&lhs.sty, &rhs.sty) {
|
||||
(ty::Ref(_, t1, _), ty::Ref(_, t2, _)) => match_borrow_depth(&t1, &t2),
|
||||
(l, r) => match (l, r) {
|
||||
@ -157,7 +157,7 @@ fn match_borrow_depth(lhs: &ty::Ty<'_>, rhs: &ty::Ty<'_>) -> bool {
|
||||
}
|
||||
}
|
||||
|
||||
fn match_types(lhs: &ty::Ty<'_>, rhs: &ty::Ty<'_>) -> bool {
|
||||
fn match_types(lhs: ty::Ty<'_>, rhs: ty::Ty<'_>) -> bool {
|
||||
match (&lhs.sty, &rhs.sty) {
|
||||
(ty::Bool, ty::Bool)
|
||||
| (ty::Char, ty::Char)
|
||||
@ -172,7 +172,7 @@ fn match_types(lhs: &ty::Ty<'_>, rhs: &ty::Ty<'_>) -> bool {
|
||||
}
|
||||
}
|
||||
|
||||
fn get_type_name(cx: &LateContext<'_, '_>, ty: &ty::Ty<'_>) -> String {
|
||||
fn get_type_name(cx: &LateContext<'_, '_>, ty: ty::Ty<'_>) -> String {
|
||||
match ty.sty {
|
||||
ty::Adt(t, _) => cx.tcx.def_path_str(t.did),
|
||||
ty::Ref(_, r, _) => get_type_name(cx, &r),
|
||||
|
@ -104,6 +104,7 @@ pub struct AbsolutePathPrinter<'a, 'tcx> {
|
||||
|
||||
use rustc::ty::print::Printer;
|
||||
|
||||
#[allow(clippy::diverging_sub_expression)]
|
||||
impl<'tcx> Printer<'tcx, 'tcx> for AbsolutePathPrinter<'_, 'tcx> {
|
||||
type Error = !;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user