-
Notifications
You must be signed in to change notification settings - Fork 12.9k
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
correctly handle uninferred consts #72066
Conversation
The job Click to expand the log.
I'm a bot! I can only do what humans tell me to, so if this was not helpful or you have suggestions for improvements, please ping or otherwise contact |
8072a53
to
49ff5d3
Compare
Yeah, I also had this experience, which put me off. Splitting it might be the way to go for now. It would be good to emit suggestions in the cases we can think of (which might involve just comparing with the type parameter version). |
Afaict we need something similar to https://doc.rust-lang.org/nightly/nightly-rustc/rustc_infer/infer/struct.InferCtxtInner.html#structfield.type_variable_storage to get a more precise span for const inferences vars. rust/src/librustc_infer/infer/error_reporting/need_type_info.rs Lines 198 to 201 in 9912925
I don't have the capacity for this at the moment, so IMO we should use this as is to at least not cause an ICE in unrelated places and open an issue so we don't forget this. |
@varkor Do you feel comfortable landing this as is or should I close this PR? |
Sorry, I lost track of this.
Yes, I think this is probably best for now. Could you open an issue to track this is? Thanks for the PR! @bors r+ rollup |
📌 Commit 3702d43 has been approved by |
correctly handle uninferred consts fixes the ICE mentioned in rust-lang#70507 (comment) I originally tried to generalize `need_type_info_err` to also work with consts which was not as much fun as I hoped 😅 It might be easier to have some duplication here and handle consts separately. r? @varkor
opened #72328 |
Should be fixed |
@bors r+ |
📌 Commit 5da7430 has been approved by |
Rollup of 5 pull requests Successful merges: - rust-lang#71886 (Stabilize saturating_abs and saturating_neg) - rust-lang#72066 (correctly handle uninferred consts) - rust-lang#72068 (Ignore arguments when looking for `IndexMut` for subsequent `mut` obligation) - rust-lang#72338 (Fix ICE in -Zsave-analysis) - rust-lang#72344 (Assert doc wording) Failed merges: r? @ghost
fixes the ICE mentioned in #70507 (comment)
I originally tried to generalize
need_type_info_err
to also work with consts which was not as much fun as I hoped 😅It might be easier to have some duplication here and handle consts separately.
r? @varkor