-
Notifications
You must be signed in to change notification settings - Fork 14k
Use proper InferCtxt when probing for associated types in astconv
#107100
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
Conversation
|
r? @lcnr (rustbot has picked a reviewer for you, use r? to override) |
This comment has been minimized.
This comment has been minimized.
f93cdcb to
38bac4a
Compare
lcnr
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i really dislike this setup 😅 we should just have the right infcx available here.
Could we instead add a method fn infcx(&self) -> Option<&InferCtxt> to trait AstConv and use that here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can you move the whole if let error reporting chain into a separate function (and module astconv/errors.rs). having this much error reporting in a function with relevant behavior makes it harder to read.
38bac4a to
5a6c63c
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can you add an assert that qself_ty does not have infer vars in this branch.
lcnr
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
r=me with updated title
InferCtxt when probing for associated types in astconv
5a6c63c to
da3ecb0
Compare
|
@bors r=lcnr |
Use proper `InferCtxt` when probing for associated types in astconv Fixes rust-lang#107087
…iaskrgr Rollup of 8 pull requests Successful merges: - rust-lang#107022 (Implement `SpecOptionPartialEq` for `cmp::Ordering`) - rust-lang#107100 (Use proper `InferCtxt` when probing for associated types in astconv) - rust-lang#107103 (Use new solver in `evaluate_obligation` query (when new solver is enabled)) - rust-lang#107190 (Recover from more const arguments that are not wrapped in curly braces) - rust-lang#107306 (Correct suggestions for closure arguments that need a borrow) - rust-lang#107339 (internally change regions to be covariant) - rust-lang#107344 (Minor tweaks in the new solver) - rust-lang#107373 (Don't merge vtables when full debuginfo is enabled.) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
Fixes #107087