From 5468336d6b11a56addc589cd24107915e3ba0d66 Mon Sep 17 00:00:00 2001 From: León Orell Valerian Liehr Date: Sun, 6 Aug 2023 23:02:27 +0200 Subject: Store the laziness of type aliases in the DefKind --- compiler/rustc_query_system/src/query/job.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'compiler/rustc_query_system') diff --git a/compiler/rustc_query_system/src/query/job.rs b/compiler/rustc_query_system/src/query/job.rs index d2140161f1d..82127b7d608 100644 --- a/compiler/rustc_query_system/src/query/job.rs +++ b/compiler/rustc_query_system/src/query/job.rs @@ -593,7 +593,10 @@ pub(crate) fn report_cycle<'a, D: DepKind>( }); } - let alias = if stack.iter().all(|entry| entry.query.def_kind == Some(DefKind::TyAlias)) { + let alias = if stack + .iter() + .all(|entry| matches!(entry.query.def_kind, Some(DefKind::TyAlias { .. }))) + { Some(crate::error::Alias::Ty) } else if stack.iter().all(|entry| entry.query.def_kind == Some(DefKind::TraitAlias)) { Some(crate::error::Alias::Trait) -- cgit 1.4.1-3-g733a5