1
Fork 0

remove diverging type variables from fn check

The comment seems incorrect. Testing revealed that the examples in
question still work (as well as some variants) even without the
special casing here.
This commit is contained in:
Niko Matsakis 2020-11-23 07:42:06 -05:00 committed by Mark Rousskov
parent 2ee89144e2
commit ebb8ff9edf
2 changed files with 13 additions and 25 deletions

View file

@ -129,7 +129,11 @@ pub enum TypeVariableOriginKind {
SubstitutionPlaceholder,
AutoDeref,
AdjustmentType,
DivergingFn,
/// In type check, when we are type checking a function that
/// returns `-> dyn Foo`, we substitute a type variable for the
/// return type for diagnostic purposes.
DynReturnFn,
LatticeVariable,
}