You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
mismatched types: expected fn&() -> ! but found fn&() -> _|_ #3681
Agreed. The current type checker has two ways to represent the same thing, which I think is what is leading to this problem. I've been thinking we oughta' fix that for some time, this bug gives me a good justification. =)
The reason we have both is that _|_ isn't a first-class type at the moment. That is, you can only mention it in the return type of a function, as !; you can't declare a local with type _|_, or a field in a data structure.
Activity
nikomatsakis commentedon Oct 8, 2012
Agreed. The current type checker has two ways to represent the same thing, which I think is what is leading to this problem. I've been thinking we oughta' fix that for some time, this bug gives me a good justification. =)
nikomatsakis commentedon Oct 8, 2012
Specifically: fn types have a
return_style(or something like that) and there is the bottom type. I don't see why we need both.catamorphism commentedon Jan 3, 2013
The reason we have both is that
_|_isn't a first-class type at the moment. That is, you can only mention it in the return type of a function, as!; you can't declare a local with type_|_, or a field in a data structure.catamorphism commentedon Jan 3, 2013
The most conservative fix here would be a way to infer the
return_stylefor closures.Remove ret_style and instead check whether fn return type is bot
Remove ret_style and instead check whether fn return type is bot
nikomatsakis commentedon Jan 8, 2013
This should be fixed.
Auto merge of rust-lang#3681 - rust-lang:rustup-2024-06-17, r=RalfJung
Merge rust-lang#3681