Add ErrorGuaranteed to HIR TyKind::Err
This commit is contained in:
parent
dcca6a375b
commit
a772a6fc2a
9 changed files with 51 additions and 45 deletions
|
@ -369,10 +369,10 @@ impl<'hir> GenericArgs<'hir> {
|
|||
|
||||
pub fn has_err(&self) -> bool {
|
||||
self.args.iter().any(|arg| match arg {
|
||||
GenericArg::Type(ty) => matches!(ty.kind, TyKind::Err),
|
||||
GenericArg::Type(ty) => matches!(ty.kind, TyKind::Err(_)),
|
||||
_ => false,
|
||||
}) || self.bindings.iter().any(|arg| match arg.kind {
|
||||
TypeBindingKind::Equality { term: Term::Ty(ty) } => matches!(ty.kind, TyKind::Err),
|
||||
TypeBindingKind::Equality { term: Term::Ty(ty) } => matches!(ty.kind, TyKind::Err(_)),
|
||||
_ => false,
|
||||
})
|
||||
}
|
||||
|
@ -2676,7 +2676,7 @@ pub enum TyKind<'hir> {
|
|||
/// specified. This can appear anywhere in a type.
|
||||
Infer,
|
||||
/// Placeholder for a type that has failed to be defined.
|
||||
Err,
|
||||
Err(rustc_span::ErrorGuaranteed),
|
||||
}
|
||||
|
||||
#[derive(Debug, HashStable_Generic)]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue