-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Function trait objects output is not normalized #5057
Comments
Duplicate of #4281? |
I assume the problem is simply inferring the result of @lnicola no, that one's about the |
Ah, yeah this happens without ?. I was confused because I have other code that correctly normalizes Fn output, but what I didn't realize that that's on a generic over Fn, not a trait object. This seems to be something specific to trait object Fns. |
This might have just been fixed? https://github.com/rust-analyzer/rust-analyzer/pull/4982/files#diff-2166f1133a31a1444822c765c18b9115L1760 |
@smmalis37 Nope. I just checked, afaics it's still "broken". |
It seems that's a bug in Chalk: rust-lang/chalk#567. (It was even simpler than my first theory -- any associated type bounds in dyn traits have this problem.) |
Normally when I use the ? operator, type inference is able to correctly see through it and mark variables with the Ok type of the Result. This seems to fall apart when used on a ref to a function trait object:I would expect the type of r to be u8.
The text was updated successfully, but these errors were encountered: