-
Notifications
You must be signed in to change notification settings - Fork 13k
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
Refuse to codegen an upstream static. #100211
Conversation
(rust-highfive has picked a reviewer for you, use r? to override) |
📌 Commit b114b2d2dce25bf47f0a186d825971d2366bc880 has been approved by It is now in the queue for this repository. |
Using metadata only crates for code generation is unsupported. Implementing such a support would need larger design work. See #38913 for the previous discussion. This effectively removes a safeguard against situation where a static item is being code generated in non-local crate, which indicates either a bug or an unsupported build configuration. Instead it erroneously duplicates those static items in each crate that references them. |
This second version limits itself to preventing the ICE, relying on |
This comment has been minimized.
This comment has been minimized.
7563943
to
a523937
Compare
Yeah, that seems uncontroversial to me. Thanks for following up. You can r=me, @cjgillot. I'll let you decide if you want to close #85401 via this PR or not. |
a523937
to
d3fee8d
Compare
mir_for_ctfe
in foreign is_mir_available
.
About closing the issue: this PR removes the ICE and explains why this does not compile. I'll consider it as fixed. |
…iaskrgr Rollup of 6 pull requests Successful merges: - rust-lang#100211 (Refuse to codegen an upstream static.) - rust-lang#100277 (Simplify format_args builtin macro implementation.) - rust-lang#100483 (Point to generic or arg if it's the self type of unsatisfied projection predicate) - rust-lang#100506 (change `InlineAsmCtxt` to not talk about `FnCtxt`) - rust-lang#100534 (Make code slightly more uniform) - rust-lang#100566 (Use `create_snapshot_for_diagnostic` instead of `clone` for `Parser`) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
Fixes #85401