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.
TyKind::Adt
1 parent 14b08b8 commit e938924Copy full SHA for e938924
clippy_lints/src/needless_path_new.rs
@@ -94,8 +94,7 @@ fn check_arguments<'tcx>(
94
let Some(path_def_id) = tcx.get_diagnostic_item(sym::Path) else {
95
return;
96
};
97
- let path_ty_kind = ty::Adt(tcx.adt_def(path_def_id), List::empty());
98
- let path_ty = tcx.mk_ty_from_kind(path_ty_kind);
+ let path_ty = Ty::new_adt(tcx, tcx.adt_def(path_def_id), List::empty());
99
let Some(asref_def_id) = tcx.get_diagnostic_item(sym::AsRef) else {
100
101
0 commit comments