Skip to content

Commit f66374d

Browse files
committed
TODO: TyKind lost Debug formatting. How to handle these cases?
1 parent 8eadbfd commit f66374d

File tree

2 files changed

+8
-6
lines changed

2 files changed

+8
-6
lines changed

clippy_lints/src/eta_reduction.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,7 @@ fn get_type_name(cx: &LateContext<'_, '_>, kind: &ty::TyKind<'_>) -> String {
176176
match kind {
177177
ty::Adt(t, _) => cx.tcx.def_path_str(t.did),
178178
ty::Ref(_, r, _) => get_type_name(cx, &r.sty),
179-
_ => kind.to_string(),
179+
_ => unimplemented!(), //kind.to_string(),
180180
}
181181
}
182182

clippy_lints/src/transmute.rs

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -346,11 +346,13 @@ impl<'a, 'tcx> LateLintPass<'a, 'tcx> for Transmute {
346346
&format!("transmute from a `{}` to a `char`", from_ty),
347347
|db| {
348348
let arg = sugg::Sugg::hir(cx, &args[0], "..");
349-
let arg = if let ty::Int(_) = from_ty.sty {
350-
arg.as_ty(ty::Uint(ast::UintTy::U32))
351-
} else {
352-
arg
353-
};
349+
unimplemented!();
350+
// FIXME
351+
// let arg = if let ty::Int(_) = from_ty.sty {
352+
// arg.as_ty(ty::Uint(ast::UintTy::U32))
353+
// } else {
354+
// arg
355+
// };
354356
db.span_suggestion(
355357
e.span,
356358
"consider using",

0 commit comments

Comments
 (0)