-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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
Don't codegen impossible to satisfy impls #109110
Conversation
r? @jackh726 (rustbot has picked a reviewer for you, use r? to override) |
a2030e6
to
90b89d4
Compare
This is certainly a way to do this. But just want to clarify. When we monomorphize an impl with type parameters, we check that the where clauses hold, right? But this is after we've already type checked the call sites and errored on use. I guess we can't eagerly monomorphize those impls? Might be worth expanding the comment a little bit. r=me after that |
90b89d4
to
b36bbb0
Compare
Left a more descriptive error message.
Yeah, we only eagerly monomorphize impls with no ty/ct params.
We don't actually have to re-check where-clauses during monomorphization in general. If something is reachable by This breaks down for eager monomorphization since we monomorphize impls with no type params that are not necessarily called by anything. |
@bors r=jackh726 |
…iaskrgr Rollup of 9 pull requests Successful merges: - rust-lang#108722 (Support for Fuchsia RISC-V target) - rust-lang#108880 (Remove tests/ui/impl-trait/in-trait/new-lowering-strategy in favor of using revisions on existing tests) - rust-lang#108909 (Fix object safety checks for new RPITITs) - rust-lang#108915 (Remove some direct calls to local_def_id_to_hir_id on diagnostics) - rust-lang#108923 (Make fns from other crates with RPITIT work for -Zlower-impl-trait-in-trait-to-assoc-ty) - rust-lang#109101 (Fall back to old metadata computation when type references errors) - rust-lang#109105 (Don't ICE for late-bound consts across `AnonConstBoundary`) - rust-lang#109110 (Don't codegen impossible to satisfy impls) - rust-lang#109116 (Emit diagnostic when calling methods on the unit type in method chains) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
Fixes #109098