-
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
allow opaques to be defined by trait queries, again #113690
Conversation
@@ -0,0 +1,12 @@ | |||
//! The trait query `foo: Fn() -> u8` is a valid defining use of RPIT. |
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.
Could you add revision to this test and the other one demonstrating what it does in the new solver?
// revisions: current next
//[next] compile-flags: -Ztrait-solver=next
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 expect it to pass in the new solver too)
This looks fine to me, but also cc @lcnr as they may have thoughts about opaques and their behavior esp wrt the transition to next solver. This does add a new I'll give this a few days for people to respond, and then will r+ as it's reverting a PR that we thought had no side-effects, and fixes an ICE if we hear nothing. @rustbot blocked |
I agree with using propagating opaque constraints from trait queries. While I am unhappy with
s/new/old 😁 |
@bors r+ |
☀️ Test successful - checks-actions |
1 similar comment
☀️ Test successful - checks-actions |
Finished benchmarking commit (b657dc5): comparison URL. Overall result: no relevant changes - no action needed@rustbot label: -perf-regression Instruction countThis benchmark run did not return any relevant results for this metric. Max RSS (memory usage)This benchmark run did not return any relevant results for this metric. CyclesResultsThis is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.
Binary sizeThis benchmark run did not return any relevant results for this metric. Bootstrap: 647.107s -> 647.114s (0.00%) |
…k-Simulacrum [beta] backport This PR backports: - rust-lang#113690: allow opaques to be defined by trait queries, again - rust-lang#113631: make MCP510 behavior opt-in to avoid conflicts between the CLI and target flavors It also includes a bump of bootstrap to the released stable. r? `@Mark-Simulacrum`
This basically reverts #112963.
Moreover, all call-sites of
enter_canonical_trait_query
can now define opaque types, see the ui testdefined-by-user-annotation.rs
.Fixes #113689
r? @compiler-errors @oli-obk