-
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
Implement support for GeneratorWitnessMIR
in new solver
#109755
Implement support for GeneratorWitnessMIR
in new solver
#109755
Conversation
Some changes occurred to the core trait solver cc @rust-lang/initiative-trait-system-refactor |
think this is fine, still not completely sure about the current approach wrt to |
When I implemented it in the current solver, the subtlety was the handling of lifetimes, since |
Oh, I guess we could instantiate fresh placeholder lifetimes for all the types in here when we encounter ReErased... I didn't check but the solver probably handles erased lifetimes (I think...), but the region constraints returned by the solver are probably not sound or correct -- so if we had some auto trait bound that holds with region constraints, they're probably not enforced. |
We currently ICE when encountering |
I thought they would be universal vars, since they're acting more like for-all over the generator interior's choice of lifetimes, but idk |
🤷 universals is also fine using placeholders. But it feels weird to have universal regions be represented using |
In the current solver, they are modeled as universals. The idea is: if If we want lifetime knowledge in generators, we'd need to compute those hidden types in borrowck instead of a separate query. I don't have such plans yet. |
0b40906
to
4385165
Compare
4385165
to
4a4fc3b
Compare
Great! |
…or-witness-mir, r=cjgillot Implement support for `GeneratorWitnessMIR` in new solver r? `@cjgillot` I mostly want this to cut down the number of failing UI tests when running the UI test suite with `--compare-mode=next-solver`, but there doesn't seem like much reason to block implementing this since it adds minimal complexity to the existing structural traits impl in the new solver. If others are against adding this for some reason, then maybe we should just make `GeneratorWitnessMIR` return `NoSolution` for these traits. Anything but an ICE please 😸 🧊
…or-witness-mir, r=cjgillot Implement support for `GeneratorWitnessMIR` in new solver r? ``@cjgillot`` I mostly want this to cut down the number of failing UI tests when running the UI test suite with `--compare-mode=next-solver`, but there doesn't seem like much reason to block implementing this since it adds minimal complexity to the existing structural traits impl in the new solver. If others are against adding this for some reason, then maybe we should just make `GeneratorWitnessMIR` return `NoSolution` for these traits. Anything but an ICE please 😸 🧊
…iaskrgr Rollup of 7 pull requests Successful merges: - rust-lang#109395 (Fix issue when there are multiple candidates for edit_distance_with_substrings) - rust-lang#109755 (Implement support for `GeneratorWitnessMIR` in new solver) - rust-lang#109782 (Don't leave a comma at the start of argument list when removing arguments) - rust-lang#109977 (rustdoc: avoid including line numbers in Google SERP snippets) - rust-lang#109980 (Derive String's PartialEq implementation) - rust-lang#109984 (Remove f32 & f64 from MemDecoder/MemEncoder) - rust-lang#110004 (add `dont_check_failure_status` option in the compiler test) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
r? @cjgillot
I mostly want this to cut down the number of failing UI tests when running the UI test suite with
--compare-mode=next-solver
, but there doesn't seem like much reason to block implementing this since it adds minimal complexity to the existing structural traits impl in the new solver.If others are against adding this for some reason, then maybe we should just make
GeneratorWitnessMIR
returnNoSolution
for these traits. Anything but an ICE please 😸 🧊