Commit Graph

3 Commits

Author SHA1 Message Date
Alisa Sireneva
644e527c17 Fix tests/ui/privacy/sysroot-private 2025-01-28 19:42:32 +03:00
Trevor Gross
ed63539282 Mark dependencies of the standard library as private by default
In order to avoid diagnostics suggesting stdlib-private dependencies,
make everything that is a direct dependency of any `std` crates private
by default. Note that this will be overridden, if the same crate is
public elsewhere in the crate graph then that overrides the private
default.

It may also be feasible to do this in the library crate, marking `std`'s
dependencies private via Cargo. However, given that the feature is still
rather unstable, doing this within the compiler seems more
straightforward.

Fixes: https://github.com/rust-lang/rust/issues/135232 [1]
2025-01-14 08:51:19 +00:00
Trevor Gross
4896a65d18 Add a UI test for stdlib-private dependencies
Introduce a test that shows stdlib-private dependencies leaking into
diagnostics. This is resolved by a later commit.
2025-01-14 08:51:17 +00:00