Uh oh!
There was an error while loading. Please reload this page.
Better errors when a Copy impl on a Struct is not self-consistent - #94249
Conversation
rust-highfive
commented
Feb 22, 2022
r? @davidtwco (rust-highfive has picked a reviewer for you, use r? to override) |
davidtwco
left a comment
There was a problem hiding this comment.
Apologies for the slow review, I think this is a sensible change and looks good. I've left a small comment, if it seems feasible to fix without a lot more work then we can do that before landing this, otherwise it can be a follow-up.
Uh oh!
There was an error while loading. Please reload this page.
38691eb to
ef85798Comparecompiler-errors
commented
Mar 23, 2022
@rustbot ready I left a FIXME, but otherwise just rebased this code. |
ef85798 to
c8cbd3dComparedavidtwco
commented
Mar 23, 2022
@bors r+ |
bors
commented
Mar 23, 2022
📌 Commit c8cbd3d has been approved by |
bors
commented
Mar 23, 2022
⌛ Testing commit c8cbd3d with merge 5114b946e9d2e10226feb30bec8c2f2e24fe3113... |
bors
commented
Mar 23, 2022
💔 Test failed - checks-actions |
rust-log-analyzer
commented
Mar 23, 2022
The job Click to see the possible cause of the failure (guessed by this bot) |
compiler-errors
commented
Mar 23, 2022
can someone bors-retry this? spurious error it seems. |
nnethercote
commented
Mar 23, 2022
@bors retry |
…askrgr Rollup of 5 pull requests Successful merges: - rust-lang#94249 (Better errors when a Copy impl on a Struct is not self-consistent) - rust-lang#95069 (Fix auto traits in rustdoc) - rust-lang#95221 (interpret/memory: simplify check_and_deref_ptr) - rust-lang#95225 (remove `[async output]` from `impl Future` pretty-printing) - rust-lang#95238 (Stop emitting E0026 for struct enums with underscores) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
As discovered in a Zulip thread with @nnethercote and @Mark-Simulacrum, it's not immediately obvious why a field on an ADT doesn't implement
Copy. This PR attempts to give slightly more detailed information by spinning up a fulfillment context to try to dig down and discover transitive fulfillment errors that causeis_copy_modulo_regionsto fail on a ADT field.The error message still kinda sucks, but should only show up in the case that an existing error message was totally missing... so I think it's a good compromise for now?