mirror of
https://github.com/rust-lang/rust.git
synced 2025-05-01 04:27:38 +00:00
![]() `compiler_builtins` is currently injected as `extern crate compiler_builtins as _`. This has made gating via diagnostics difficult because it appears in the crate graph as a non-private dependency, and there isn't an easy way to differentiate between the injected AST and user-specified `extern crate compiler_builtins`. Resolve this by injecting `compiler_builtins` during postprocessing rather than early in the AST. Most of the time this isn't even needed because it shows up in `std` or `core`'s crate graph, but injection is still needed to ensure `#![no_core]` works correctly. A similar change was attempted at [1] but this encountered errors building `proc_macro` and `rustc-std-workspace-std`. Similar failures showed up while working on this patch, which were traced back to `compiler_builtins` showing up in the graph twice (once via dependency and once via injection). This is resolved by not injecting if a `#![compiler_builtins]` crate already exists. [1]: https://github.com/rust-lang/rust/pull/113634 |
||
---|---|---|
.. | ||
auxiliary | ||
empty-extern-arg.rs | ||
empty-extern-arg.stderr | ||
force-extern.rs | ||
invalid-crate-name-dashed.rs | ||
invalid-crate-name-dashed.stderr | ||
invalid-crate-name-non-ascii.rs | ||
invalid-crate-name-non-ascii.stderr | ||
invalid-crate-name.rs | ||
invalid-crate-name.stderr | ||
multiple-opts.rs | ||
multiple-opts.stderr | ||
no-force-extern.rs | ||
no-nounused.rs | ||
no-nounused.stderr | ||
noprelude-and-prelude.rs | ||
noprelude-resolves.rs | ||
noprelude.rs | ||
noprelude.stderr | ||
nounused.rs | ||
public-and-private.rs | ||
public-and-private.stderr | ||
redundant-force-extern.rs |