Store the laziness of type aliases in the DefKind
This commit is contained in:
parent
34ccd04859
commit
5468336d6b
49 changed files with 208 additions and 93 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue