about summary refs log tree commit diff
path: root/compiler/rustc_borrowck/src/diagnostics
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2023-09-27 01:48:53 +0000
committerbors <bors@rust-lang.org>2023-09-27 01:48:53 +0000
commit6b99cf1d35c8b7855a6b7f503d91edb223f027a1 (patch)
tree3c4bb48e6ac2b59be0e257ad129185c59635eead /compiler/rustc_borrowck/src/diagnostics
parente1636a0939fe8f7943d543f4cd0d7454ea4df487 (diff)
parentd6ce9ce115e8d0859e378b411966905c8b815845 (diff)
downloadrust-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_borrowck/src/diagnostics')
-rw-r--r--compiler/rustc_borrowck/src/diagnostics/region_name.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/rustc_borrowck/src/diagnostics/region_name.rs b/compiler/rustc_borrowck/src/diagnostics/region_name.rs
index dc304cd7605..55d581b3ab1 100644
--- a/compiler/rustc_borrowck/src/diagnostics/region_name.rs
+++ b/compiler/rustc_borrowck/src/diagnostics/region_name.rs
@@ -516,7 +516,7 @@ impl<'tcx> MirBorrowckCtxt<'_, 'tcx> {
                         // be the same as those of the ADT.
                         // FIXME: We should be able to do something similar to
                         // match_adt_and_segment in this case.
-                        Res::Def(DefKind::TyAlias { .. }, _) => (),
+                        Res::Def(DefKind::TyAlias, _) => (),
                         _ => {
                             if let Some(last_segment) = path.segments.last() {
                                 if let Some(highlight) = self.match_adt_and_segment(