Files
rust/tests/ui/crate-loading
Jonathan Brouwer 9ad15589b7 Rollup merge of #159717 - adamgemmell:dev/reucru01/no-implicit-sysroot-deps, r=nnethercote
Add `-Zimplicit-sysroot-deps`

This PR, originally authored by @CrooseGit, adds support for a new flag [proposed in the `build-std=always` RFC](https://rust-lang.github.io/rfcs/3874-build-std-always.html#preventing-implicit-sysroot-dependencies). It unblocks work by @Bryanskiy around handling panic strategies in build-std, for which rustc must look for them in `-Ldependency` locations and not the sysroot.

`-Zimplicit-sysroot-deps` is true by default. When false, rustc will not look in the sysroot when attempting to resolve direct dependencies. It is intended to be used by Cargo when using build-std to improve error messages, avoiding the common "duplicate lang item in crate `core`" error that occurs when not all required standard library crates have been built.

Not included in this PR is the behaviour around dependencies injected by rustc in `rustc_metadata`, such as panic runtimes and compiler-builtins, which will be addressed in the future.
2026-07-29 14:10:34 +02:00
..
2026-07-09 23:34:43 +02:00
2026-07-09 23:32:40 +02:00
2026-07-28 15:18:36 +01:00