We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 23646e6 commit 7bcf40aCopy full SHA for 7bcf40a
clippy_lints/src/default_trait_access.rs
@@ -42,7 +42,7 @@ impl<'tcx> LateLintPass<'tcx> for DefaultTraitAccess {
42
if let QPath::Resolved(None, _path) = qpath;
43
then {
44
let expr_ty = cx.typeck_results().expr_ty(expr);
45
- if let ty::Adt(def, ..) = expr_ty.kind {
+ if let ty::Adt(def, ..) = expr_ty.kind() {
46
// TODO: Work out a way to put "whatever the imported way of referencing
47
// this type in this file" rather than a fully-qualified type.
48
let replacement = format!("{}::default()", cx.tcx.def_path_str(def.did));
0 commit comments