-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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
Stop handling opaque types in queries and leave it to typeck #107891
Conversation
Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @lcnr (or someone else) soon. Please see the contribution instructions for more information. |
@bors try @rust-timer queue |
Some changes occurred to the core trait solver cc @rust-lang/initiative-trait-system-refactor Some changes occurred in engine.rs, potentially modifying the public API of |
This comment has been minimized.
This comment has been minimized.
⌛ Trying commit 89fe6b48916136f46d0c57faffa3841324c391ab with merge 4ae96c1c1c34188e3906cc8962b1d55407f0ae87... |
This may need a crater run... 🤔 |
yea, this is a test coverage incubator due to the opt-in-ness |
☀️ Try build successful - checks-actions |
This comment has been minimized.
This comment has been minimized.
@craterbot check |
👌 Experiment ℹ️ Crater is a tool to run experiments across parts of the Rust ecosystem. Learn more |
🚧 Experiment ℹ️ Crater is a tool to run experiments across parts of the Rust ecosystem. Learn more |
Finished benchmarking commit (4ae96c1c1c34188e3906cc8962b1d55407f0ae87): comparison URL. Overall result: ❌ regressions - ACTION NEEDEDBenchmarking this pull request likely means that it is perf-sensitive, so we're automatically marking it as not fit for rolling up. While you can manually mark this PR as fit for rollup, we strongly recommend not doing so since this PR may lead to changes in compiler perf. Next Steps: If you can justify the regressions found in this try perf run, please indicate this with @bors rollup=never Instruction countThis is a highly reliable metric that was used to determine the overall result at the top of this comment.
Max RSS (memory usage)This benchmark run did not return any relevant results for this metric. CyclesThis benchmark run did not return any relevant results for this metric. |
looks like noise |
🎉 Experiment
|
@rustbot ready |
56e3187
to
379d6b1
Compare
This comment has been minimized.
This comment has been minimized.
379d6b1
to
f639b06
Compare
☔ The latest upstream changes (presumably #107924) made this pull request unmergeable. Please resolve the merge conflicts. |
d731f99
to
67643f5
Compare
☔ The latest upstream changes (presumably #108286) made this pull request unmergeable. Please resolve the merge conflicts. |
|
yes, i fixed it in 834b566 |
…lly register hidden types anymore
…ed on its own and we have the right defaults for trait solvers
67643f5
to
018f210
Compare
let infcx = self | ||
.tcx | ||
.infer_ctxt() | ||
// HACK This bubble is required for this tests to pass: |
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.
// HACK This bubble is required for this tests to pass: | |
// HACK This ignore is required for this tests to pass: |
Make hidden type registration opt-in, so that each site can be reviewed on its own and we have the right defaults for trait solvers r? `@lcnr` pulled out of rust-lang#107891 as it is the uncontroversial part
☔ The latest upstream changes (presumably #108311) made this pull request unmergeable. Please resolve the merge conflicts. |
apply query response: actually define opaque types not sure whether this fixes any code considering that rust-lang#107891 doesn't break anything, but this is currently wrong as the `eq` there should just always fail right now. We can definitely hit this code if we remove the `replace_opaque_types_with_inference_vars` hack. Doing so without this PR causes a few tests to ICE, e.g. https://github.com/rust-lang/rust/blob/bd4a96a12d0bf6dc12edf20a45df3a33052c9d7d/tests/ui/impl-trait/issue-99642.rs#L1-L7 r? `@oli-obk`
i feel like we probably want to close this as we intend to refactor the |
Some cleanups now that all the lazy TAIT work has settled down.
We do not need to look into queries anymore, as all the opaque types get "equated away" early enough so that the trait solvers don't see opaque types unless they should treat them opaquely.
The last commit additionally flips the default on
infcx.at(...).eq
and friends, requiring you to opt-in to registering hidden types. We can probably do more cleanups here and possibly manage to eliminate theInferCtxt::defining_use_anchor
field entirely by doing all processing at thedefine_opaque_types
sites.r? @lcnr