diff options
| author | bors <bors@rust-lang.org> | 2023-09-27 01:48:53 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2023-09-27 01:48:53 +0000 |
| commit | 6b99cf1d35c8b7855a6b7f503d91edb223f027a1 (patch) | |
| tree | 3c4bb48e6ac2b59be0e257ad129185c59635eead /compiler/rustc_query_system | |
| parent | e1636a0939fe8f7943d543f4cd0d7454ea4df487 (diff) | |
| parent | d6ce9ce115e8d0859e378b411966905c8b815845 (diff) | |
| download | rust-6b99cf1d35c8b7855a6b7f503d91edb223f027a1.tar.gz rust-6b99cf1d35c8b7855a6b7f503d91edb223f027a1.zip | |
Auto merge of #116163 - compiler-errors:lazyness, r=oli-obk
Don't store lazyness in `DefKind::TyAlias` 1. Don't store lazyness of a type alias in its `DefKind`, but instead via a query. 2. This allows us to treat type aliases as lazy if `#[feature(lazy_type_alias)]` *OR* if the alias contains a TAIT, rather than having checks for both in separate parts of the codebase. r? `@oli-obk` cc `@fmease`
Diffstat (limited to 'compiler/rustc_query_system')
| -rw-r--r-- | compiler/rustc_query_system/src/query/job.rs | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/compiler/rustc_query_system/src/query/job.rs b/compiler/rustc_query_system/src/query/job.rs index 2e9ebde296c..f2c1f84fccc 100644 --- a/compiler/rustc_query_system/src/query/job.rs +++ b/compiler/rustc_query_system/src/query/job.rs @@ -580,9 +580,7 @@ pub(crate) fn report_cycle<'a>( }); } - let alias = if stack - .iter() - .all(|entry| matches!(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)) { |
