be more permissive wrt overflow and and improve diagnostics - #161341
be more permissive wrt overflow and and improve diagnostics#161341adwinwhite wants to merge 6 commits into
Conversation
858bfc1 to
0d21359
Compare
This comment has been minimized.
This comment has been minimized.
61aecad to
ce9f31f
Compare
|
Some changes occurred to the core trait solver cc @rust-lang/initiative-trait-system-refactor |
This comment has been minimized.
This comment has been minimized.
| = help: consider increasing the recursion limit by adding a `#![recursion_limit = "16"]` attribute to your crate (`fcw_on_normalization`) | ||
| = help: or consider adding a manual `impl` of auto traits like `Send` for intermediate types, if auto traits are involved | ||
| = note: which requires <W<W<W<W<W<W<W<W<W<()>>>>>>>>> as HasAssoc>::Assoc == () | ||
| = note: which requires <W<W<W<W<W<W<W<W<()>>>>>>>> as HasAssoc>::Assoc == () |
There was a problem hiding this comment.
why does this stop after 2 goals? that's surprising
There was a problem hiding this comment.
oh, that's because Projection goals don't add their nested NormalizesTo goal as a nested goal for proof trees 🤔 that sucks
There was a problem hiding this comment.
| } | ||
|
|
||
| fn visit_goal(&mut self, goal: &inspect::InspectGoal<'_, 'tcx>) -> Self::Result { | ||
| self.predicates.push(goal.goal().predicate); |
There was a problem hiding this comment.
does this currently print both NormalizesTo and the Projection goal? if so, we should probably filter the NormalizesTo goal here :>
ce9f31f to
3f63986
Compare
|
This PR was rebased onto a different main commit. Here's a range-diff highlighting what actually changed. Rebasing is a normal part of keeping PRs up to date, so no action is needed—this note is just to help reviewers. |
|
first three commits were approved by adwin in #160632, r=me on the second 2 with my applied nits in the last commit, which feel small enough to not require an additional review wrt to perf
@bors r=lcnr,adwinwhite rollup |
|
@bors r- |
|
This pull request was unapproved. |
3f63986 to
a868158
Compare
|
@bors r=lcnr,adwinwhite rollup |
a868158 to
fbc1635
Compare
|
This pull request was unapproved. |
fbc1635 to
3f63986
Compare
…cnr,adwinwhite be more permissive wrt overflow and and improve diagnostics This builds on rust-lang#160632 Previously we only showed a single root goal for the FCW. It was difficult to find out how the goal overflowed. We display a proving chain now which should help users identify relevant types or auto traits. This will affect perf for crates emitting the FCW. E.g. `calimero-store` goes from 4.7s -> 5.7s in local testing since it emits thousands of FCWs internally. The FCW is a mitigation of future hard error and authors are expected to resolve it so it's probably acceptable. It doesn't affect crates without the FCW. r? lcnr
…uwer Rollup of 7 pull requests Successful merges: - #157513 (Reject non-constructor self types in const-arg tuple-call lowering) - #159887 (compiletest: forward disable-minification from bootstrap) - #160949 (Add floating point inline ASM support for SPARC) - #156160 (feat: add symmetric PartialEq impls for Vec, &[T], &mut [T] versus Cow<'_, [T]>) - #160302 (target_features: sse (or at least avx2) is incompatible with soft-float ABI) - #160914 (Derive `GenericTypeVisitable` for `RegionConstraint` _correctly_) - #161341 (be more permissive wrt overflow and and improve diagnostics)
…cnr,adwinwhite be more permissive wrt overflow and and improve diagnostics This builds on rust-lang#160632 Previously we only showed a single root goal for the FCW. It was difficult to find out how the goal overflowed. We display a proving chain now which should help users identify relevant types or auto traits. This will affect perf for crates emitting the FCW. E.g. `calimero-store` goes from 4.7s -> 5.7s in local testing since it emits thousands of FCWs internally. The FCW is a mitigation of future hard error and authors are expected to resolve it so it's probably acceptable. It doesn't affect crates without the FCW. r? lcnr
View all comments
This builds on #160632
Previously we only showed a single root goal for the FCW. It was difficult to find out how the goal overflowed.
We display a proving chain now which should help users identify relevant types or auto traits.
This will affect perf for crates emitting the FCW. E.g.
calimero-storegoes from 4.7s -> 5.7s in local testing since it emits thousands of FCWs internally. The FCW is a mitigation of future hard error and authors are expected to resolve it so it's probably acceptable. It doesn't affect crates without the FCW.r? lcnr