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.
path_ty
1 parent 3550676 commit dafdad7Copy full SHA for dafdad7
clippy_lints/src/needless_path_new.rs
@@ -75,10 +75,13 @@ fn check_arguments<'tcx>(
75
}
76
};
77
78
- let Some(path_def_id) = tcx.get_diagnostic_item(sym::Path) else {
79
- return;
+ let path_ty = {
+ let Some(path_def_id) = tcx.get_diagnostic_item(sym::Path) else {
80
+ return;
81
+ };
82
+ Ty::new_adt(tcx, tcx.adt_def(path_def_id), List::empty())
83
- let path_ty = Ty::new_adt(tcx, tcx.adt_def(path_def_id), List::empty());
84
+
85
let Some(asref_def_id) = tcx.get_diagnostic_item(sym::AsRef) else {
86
return;
87
0 commit comments