1
Fork 0

Store the laziness of type aliases in the DefKind

This commit is contained in:
León Orell Valerian Liehr 2023-08-06 23:02:27 +02:00
parent 34ccd04859
commit 5468336d6b
No known key found for this signature in database
GPG key ID: D17A07215F68E713
49 changed files with 208 additions and 93 deletions

View file

@ -209,7 +209,7 @@ fn find_item_ty_spans(
match ty.kind {
hir::TyKind::Path(hir::QPath::Resolved(_, path)) => {
if let Res::Def(kind, def_id) = path.res
&& kind != DefKind::TyAlias {
&& !matches!(kind, DefKind::TyAlias { .. }) {
let check_params = def_id.as_local().map_or(true, |def_id| {
if def_id == needle {
spans.push(ty.span);