Skip to content
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

Exclude dependencies of std for diagnostics #135278

Merged
merged 5 commits into from
Jan 14, 2025

Conversation

tgross35
Copy link
Contributor

@tgross35 tgross35 commented Jan 9, 2025

Currently crates in the sysroot can show up in diagnostic suggestions, such as in #135232. To prevent this, duplicate all_traits into visible_traits which only shows traits in non-private crates.

Setting #![feature(rustc_private)] overrides this and makes items in private crates visible as well, since rustc_private enables use of std's private dependencies.

This may be reviewed per-commit.

Fixes: #135232

@rustbot
Copy link
Collaborator

rustbot commented Jan 9, 2025

r? @SparrowLii

rustbot has assigned @SparrowLii.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Jan 9, 2025
@tgross35
Copy link
Contributor Author

tgross35 commented Jan 9, 2025

Unsure whether adding a query is okay or if this should just be a filtering method on tcx. I am still figuring out a good way to test this so

@rustbot author

@rustbot rustbot added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Jan 9, 2025
@tgross35
Copy link
Contributor Author

tgross35 commented Jan 9, 2025

Another option is to drop stdlib_private_dep and just use private_dep in the query. I didn't do this originally because I thought private_dep was more tightly coupled to the public_private_dependencies feature, but maybe this isn't the case.

Open to suggestions here.

@tgross35 tgross35 force-pushed the ignore-std-dep-crates branch 3 times, most recently from 6a3e3c6 to a04ed09 Compare January 13, 2025 02:45
@tgross35
Copy link
Contributor Author

Okay, I think I have something workable here. I dropped stdlib_private_dep in favor of reusing is_private_dep, and added a repro.

@rustbot ready

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Jan 13, 2025
Copy link
Member

@SparrowLii SparrowLii left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This change makes sense, but I'm not sure it is the best for diagnostics' design.
@compiler-errors Could you help have a review?

pub fn all_traits(self) -> impl Iterator<Item = DefId> + 'tcx {
iter::once(LOCAL_CRATE)
.chain(self.crates(()).iter().copied())
.chain(self.visible_crates(()).iter().copied())
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we have to change this? It makes sense to analyze trait candidates from private dependencies IMO, we just need to exclude it from diagnostics

And if we not change it here, we can avoid to add a new query since visible_crates only be used in the query all_diagnostic_items

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeah, this seems wrong. all_traits is also used by things like SMIR and rustdoc in ways that are not just diagnostics. if you want to distinguish "all visible traits" from "all traits", and then use the former in diagnostics, then it should be more explicit.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wasn't sure about this one, but yeah that makes sense. I guess there are a couple questions - should the query be kept or should it just filter as-needed? My original thought was that there could be other existing or new places where crates is used but visible_crates would be more correct, but maybe this isn't very true.

Then either way, should all_traits be split into visible_traits, or is filtering in all_diagnostic_items sufficient to cover this case? (I didn't realize that would affect the output here, so didn't actually test that on its own)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the filtering should be done as needed. if we expose visible_traits as just a function, it doesn't matter if the filtering is expensive b/c we only call it on the diagnostic codepath (i.e. failed compilation).

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Then either way, should all_traits be split into visible_traits, or is filtering in all_diagnostic_items sufficient to cover this case? (I didn't realize that would affect the output here, so didn't actually test that on its own)

probably worth just testing yourself, idk off the top of my head lol

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just tested, seems like all_diagnostic_items doesn't have any effect on the relevant output here so it has to filter somewhere else too.

So I got rid of the query and split all_traits into all_traits and visible_traits that does the filtering on the fly. I also replaced all_traits in a few other places that deal with errors that seem reasonable (?), still waiting for my tests to finish and see if that affects much.

@compiler-errors
Copy link
Member

@bors try @rust-timer queue

@rust-timer

This comment has been minimized.

@rustbot rustbot added the S-waiting-on-perf Status: Waiting on a perf run to be completed. label Jan 13, 2025
bors added a commit to rust-lang-ci/rust that referenced this pull request Jan 13, 2025
Exclude dependencies of `std` for diagnostics

Currently crates in the sysroot can show up in diagnostic suggestions, such as in rust-lang#135232. To prevent this, introduce a query `visible_crates` that excludes crates marked `is_private_dep` and use this query in user-facing areas of code.

Setting `#![feature(rustc_private)]` overrides this to just use all crates, since `rustc_private` enables use of `std`'s private dependencies.

Notably, this changes `all_traits` to use `.visible_crates(())` rather than `.crates(())`. This is not strictly required and filtering could happen later as-needed; however, I cannot think of any cases where traits from private dependencies should be relevant in trait selection or diagnostics, so filtering at this earlier point seems more likely to avoid similar issues in the future.

This may be reviewed per-commit.

Fixes: rust-lang#135232
@bors
Copy link
Contributor

bors commented Jan 13, 2025

⌛ Trying commit a04ed09 with merge dbe10d0...

@tgross35 tgross35 force-pushed the ignore-std-dep-crates branch from a04ed09 to 871d75a Compare January 13, 2025 05:00
@rustbot
Copy link
Collaborator

rustbot commented Jan 13, 2025

HIR ty lowering was modified

cc @fmease

@tgross35 tgross35 force-pushed the ignore-std-dep-crates branch 2 times, most recently from 35ad309 to c0eb4af Compare January 13, 2025 05:26
@rust-log-analyzer

This comment has been minimized.

@tgross35
Copy link
Contributor Author

(^ spurious CI failure)

@SparrowLii
Copy link
Member

@bors try @rust-timer queue

tgross35 added a commit to tgross35/rust that referenced this pull request Jan 29, 2025
The change between 0.1.143 and 0.1.144 includes refactoring that was in
compiler-builtins before, but had to be reverted before landing in
rust-lang/rust because the traits were leaking into diagnostics [1].
Recently a fix for this issue was merged [2] so the cleanup is reapplied
here.

This also acts as a regression test for [2].

[1]: rust-lang#128691 (comment)
[2]: rust-lang#135278
rust-cloud-vms bot pushed a commit to tgross35/rust that referenced this pull request Jan 29, 2025
`compiler_builtins` is always available as an injected dependency,
introduced in AST as `extern crate compiler_builtins as _`. This makes
it indistinguishable from any other user-specified `extern crate`,
meaning `is_private_dep` does not see it as a dependency that should be
marked private; this is the reason that `compiler_builtins` sometimes
leaks into diagnostics, and has slightly different behavior from other
stdlib dependencies tested in [1].

There is no easy way to know that an instance of `extern crate
compiler_builtins` was the injected version; however,
`compiler_builtins`

To get around this, always mark `compiler_builtins` private. The items
in this crate are never used directly, and this is the most

[1]: rust-lang#135278
rust-cloud-vms bot pushed a commit to tgross35/rust that referenced this pull request Jan 29, 2025
The change between 0.1.143 and 0.1.144 includes refactoring that was in
compiler-builtins before, but had to be reverted before landing in
rust-lang/rust because the traits were leaking into diagnostics [1].
Recently a fix for this issue was merged [2] so the cleanup is reapplied
here.

This also acts as a regression test for [2].

[1]: rust-lang#128691 (comment)
[2]: rust-lang#135278
rust-cloud-vms bot pushed a commit to tgross35/rust that referenced this pull request Jan 29, 2025
The change between 0.1.143 and 0.1.144 includes refactoring that was in
compiler-builtins before, but had to be reverted before landing in
rust-lang/rust because the traits were leaking into diagnostics [1].
Recently a fix for this issue was merged [2] so the cleanup is reapplied
here.

This also acts as a regression test for [2].

[1]: rust-lang#128691 (comment)
[2]: rust-lang#135278
tgross35 added a commit to tgross35/rust that referenced this pull request Jan 29, 2025
The change between 0.1.143 and 0.1.144 includes refactoring that was in
compiler-builtins before, but had to be reverted before landing in
rust-lang/rust because the traits were leaking into diagnostics [1].
Recently a fix for this issue was merged [2] so the cleanup is reapplied
here.

This also acts as a regression test for [2].

[1]: rust-lang#128691 (comment)
[2]: rust-lang#135278
tgross35 added a commit to tgross35/rust that referenced this pull request Jan 30, 2025
The change between 0.1.143 and 0.1.144 includes refactoring that was in
compiler-builtins before, but had to be reverted before landing in
rust-lang/rust because the traits were leaking into diagnostics [1].
Recently a fix for this issue was merged [2] so the cleanup is reapplied
here.

This also acts as a regression test for [2].

[1]: rust-lang#128691 (comment)
[2]: rust-lang#135278
tgross35 added a commit to tgross35/rust that referenced this pull request Jan 30, 2025
The change between 0.1.143 and 0.1.144 includes refactoring that was in
compiler-builtins before, but had to be reverted before landing in
rust-lang/rust because the traits were leaking into diagnostics [1].
Recently a fix for this issue was merged [2] so the cleanup is reapplied
here.

This also acts as a regression test for [2].

[1]: rust-lang#128691 (comment)
[2]: rust-lang#135278
tgross35 added a commit to tgross35/rust that referenced this pull request Jan 30, 2025
The change between 0.1.143 and 0.1.144 includes refactoring that was in
compiler-builtins before, but had to be reverted before landing in
rust-lang/rust because the traits were leaking into diagnostics [1].
Recently a fix for this issue was merged [2] so the cleanup is reapplied
here.

This also acts as a regression test for [2].

[1]: rust-lang#128691 (comment)
[2]: rust-lang#135278
bors added a commit to rust-lang-ci/rust that referenced this pull request Jan 30, 2025
…, r=<try>

Resolve `compiler_builtins` not being treated as private; clean up rust-lang#135278

Follow up of rust-lang#135278

Do the following (one per commit):

* Do not make dependencies of `std` private by default
* Update remaining sysroot crates to use `public-dependencies`
* Force `compiler_builtins` to be private, since it is an injected `extern crate`
* Ensure that marking a dependency private makes its dependents private by default as well
* Do the `compiler_builtins` update that has been blocked on this

Based on top of rust-lang#136226 so there are a few preceding commits.

try-job: test-various
try-job: x86_64-msvc-1
tgross35 added a commit to tgross35/rust that referenced this pull request Jan 30, 2025
The change between 0.1.143 and 0.1.144 includes refactoring that was in
compiler-builtins before, but had to be reverted before landing in
rust-lang/rust because the traits were leaking into diagnostics [1].
Recently a fix for this issue was merged [2] so the cleanup is reapplied
here.

This also acts as a regression test for [2].

[1]: rust-lang#128691 (comment)
[2]: rust-lang#135278
bors added a commit to rust-lang-ci/rust that referenced this pull request Jan 30, 2025
…, r=<try>

Resolve `compiler_builtins` not being treated as private; clean up rust-lang#135278

Follow up of rust-lang#135278

Do the following (one per commit):

* Do not make dependencies of `std` private by default
* Update remaining sysroot crates to use `public-dependencies`
* Ensure that marking a dependency private makes its dependents private by default as well
* Do the `compiler_builtins` update that has been blocked on this

Based on top of rust-lang#136226 so there are a few preceding commits.

try-job: test-various
try-job: x86_64-msvc-1
tgross35 added a commit to tgross35/compiler-builtins that referenced this pull request Feb 20, 2025
Replace `public_test_dep!` by placing optionally public items into new
modules, then controlling what is exported with the `public-test-deps`
feature.

This is nicer for automatic formatting and diagnostics.

This is a reland of 2e2a925 ("Eliminate the use of
`public_test_dep!`"), which was reverted in 47e50fd ('Revert "Eliminate
the use of..."') due to a bug exposed at [1]. This was fixed in [2], so
the cleanup should be able to be applied again.

[1]: rust-lang/rust#128691
[2]: rust-lang/rust#135278

(cherry picked from commit d4abaf4)
bors added a commit to rust-lang-ci/rust that referenced this pull request Feb 20, 2025
…, r=<try>

Inject `compiler_builtins` during postprocessing and ensure it is made private

Follow up of rust-lang#135278

Do the following:

* Inject `compiler_builtins` during postprocessing, rather than injecting `extern crate compiler_builtins as _` into the AST
* Do not make dependencies of `std` private by default (this was added in rust-lang#135278)
* Make sure sysroot crates correctly mark their dependencies private/public
* Ensure that marking a dependency private makes its dependents private by default as well, unless otherwise specified
* Do the `compiler_builtins` update that has been blocked on this

There is more detail in the commit messages. This includes the changes I was working on in rust-lang#136226.

try-job: test-various
try-job: x86_64-msvc-1
try-job: x86_64-msvc-2
try-job: i686-mingw
bors added a commit to rust-lang-ci/rust that referenced this pull request Feb 20, 2025
…, r=<try>

Inject `compiler_builtins` during postprocessing and ensure it is made private

Follow up of rust-lang#135278

Do the following:

* Inject `compiler_builtins` during postprocessing, rather than injecting `extern crate compiler_builtins as _` into the AST
* Do not make dependencies of `std` private by default (this was added in rust-lang#135278)
* Make sure sysroot crates correctly mark their dependencies private/public
* Ensure that marking a dependency private makes its dependents private by default as well, unless otherwise specified
* Do the `compiler_builtins` update that has been blocked on this

There is more detail in the commit messages. This includes the changes I was working on in rust-lang#136226.

try-job: test-various
try-job: x86_64-msvc-1
try-job: x86_64-msvc-2
try-job: i686-mingw-1
try-job: i686-mingw-2
try-job: i686-mingw-3
bors added a commit to rust-lang-ci/rust that referenced this pull request Feb 20, 2025
…, r=<try>

Inject `compiler_builtins` during postprocessing and ensure it is made private

Follow up of rust-lang#135278

Do the following:

* Inject `compiler_builtins` during postprocessing, rather than injecting `extern crate compiler_builtins as _` into the AST
* Do not make dependencies of `std` private by default (this was added in rust-lang#135278)
* Make sure sysroot crates correctly mark their dependencies private/public
* Ensure that marking a dependency private makes its dependents private by default as well, unless otherwise specified
* Do the `compiler_builtins` update that has been blocked on this

There is more detail in the commit messages. This includes the changes I was working on in rust-lang#136226.

try-job: test-various
try-job: x86_64-msvc-1
try-job: x86_64-msvc-2
try-job: i686-mingw-1
try-job: i686-mingw-2
tgross35 added a commit to tgross35/compiler-builtins that referenced this pull request Feb 20, 2025
Replace `public_test_dep!` by placing optionally public items into new
modules, then controlling what is exported with the `public-test-deps`
feature.

This is nicer for automatic formatting and diagnostics.

This is a reland of 2e2a925 ("Eliminate the use of
`public_test_dep!`"), which was reverted in 47e50fd ('Revert "Eliminate
the use of..."') due to a bug exposed at [1]. This was fixed in [2], so
the cleanup should be able to be applied again.

[1]: rust-lang/rust#128691
[2]: rust-lang/rust#135278

(cherry picked from commit d4abaf4)
bors added a commit to rust-lang-ci/rust that referenced this pull request Feb 20, 2025
…, r=<try>

Inject `compiler_builtins` during postprocessing and ensure it is made private

Follow up of rust-lang#135278

Do the following:

* Inject `compiler_builtins` during postprocessing, rather than injecting `extern crate compiler_builtins as _` into the AST
* Do not make dependencies of `std` private by default (this was added in rust-lang#135278)
* Make sure sysroot crates correctly mark their dependencies private/public
* Ensure that marking a dependency private makes its dependents private by default as well, unless otherwise specified
* Do the `compiler_builtins` update that has been blocked on this

There is more detail in the commit messages. This includes the changes I was working on in rust-lang#136226.

try-job: test-various
try-job: x86_64-msvc-1
try-job: x86_64-msvc-2
try-job: i686-mingw-1
try-job: i686-mingw-2
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Feb 22, 2025
…te, r=bjorn3

Inject `compiler_builtins` during postprocessing and ensure it is made private

Follow up of rust-lang#135278

Do the following:

* Inject `compiler_builtins` during postprocessing, rather than injecting `extern crate compiler_builtins as _` into the AST
* Do not make dependencies of `std` private by default (this was added in rust-lang#135278)
* Make sure sysroot crates correctly mark their dependencies private/public
* Ensure that marking a dependency private makes its dependents private by default as well, unless otherwise specified
* Do the `compiler_builtins` update that has been blocked on this

There is more detail in the commit messages. This includes the changes I was working on in rust-lang#136226.

try-job: test-various
try-job: x86_64-msvc-1
try-job: x86_64-msvc-2
try-job: i686-mingw-1
try-job: i686-mingw-2
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Feb 22, 2025
…te, r=bjorn3

Inject `compiler_builtins` during postprocessing and ensure it is made private

Follow up of rust-lang#135278

Do the following:

* Inject `compiler_builtins` during postprocessing, rather than injecting `extern crate compiler_builtins as _` into the AST
* Do not make dependencies of `std` private by default (this was added in rust-lang#135278)
* Make sure sysroot crates correctly mark their dependencies private/public
* Ensure that marking a dependency private makes its dependents private by default as well, unless otherwise specified
* Do the `compiler_builtins` update that has been blocked on this

There is more detail in the commit messages. This includes the changes I was working on in rust-lang#136226.

try-job: test-various
try-job: x86_64-msvc-1
try-job: x86_64-msvc-2
try-job: i686-mingw-1
try-job: i686-mingw-2
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Feb 22, 2025
…te, r=bjorn3

Inject `compiler_builtins` during postprocessing and ensure it is made private

Follow up of rust-lang#135278

Do the following:

* Inject `compiler_builtins` during postprocessing, rather than injecting `extern crate compiler_builtins as _` into the AST
* Do not make dependencies of `std` private by default (this was added in rust-lang#135278)
* Make sure sysroot crates correctly mark their dependencies private/public
* Ensure that marking a dependency private makes its dependents private by default as well, unless otherwise specified
* Do the `compiler_builtins` update that has been blocked on this

There is more detail in the commit messages. This includes the changes I was working on in rust-lang#136226.

try-job: test-various
try-job: x86_64-msvc-1
try-job: x86_64-msvc-2
try-job: i686-mingw-1
try-job: i686-mingw-2
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Feb 22, 2025
…te, r=bjorn3

Inject `compiler_builtins` during postprocessing and ensure it is made private

Follow up of rust-lang#135278

Do the following:

* Inject `compiler_builtins` during postprocessing, rather than injecting `extern crate compiler_builtins as _` into the AST
* Do not make dependencies of `std` private by default (this was added in rust-lang#135278)
* Make sure sysroot crates correctly mark their dependencies private/public
* Ensure that marking a dependency private makes its dependents private by default as well, unless otherwise specified
* Do the `compiler_builtins` update that has been blocked on this

There is more detail in the commit messages. This includes the changes I was working on in rust-lang#136226.

try-job: test-various
try-job: x86_64-msvc-1
try-job: x86_64-msvc-2
try-job: i686-mingw-1
try-job: i686-mingw-2
rust-timer added a commit to rust-lang-ci/rust that referenced this pull request Feb 23, 2025
Rollup merge of rust-lang#135501 - tgross35:stdlib-dependencies-private, r=bjorn3

Inject `compiler_builtins` during postprocessing and ensure it is made private

Follow up of rust-lang#135278

Do the following:

* Inject `compiler_builtins` during postprocessing, rather than injecting `extern crate compiler_builtins as _` into the AST
* Do not make dependencies of `std` private by default (this was added in rust-lang#135278)
* Make sure sysroot crates correctly mark their dependencies private/public
* Ensure that marking a dependency private makes its dependents private by default as well, unless otherwise specified
* Do the `compiler_builtins` update that has been blocked on this

There is more detail in the commit messages. This includes the changes I was working on in rust-lang#136226.

try-job: test-various
try-job: x86_64-msvc-1
try-job: x86_64-msvc-2
try-job: i686-mingw-1
try-job: i686-mingw-2
tgross35 added a commit to tgross35/compiler-builtins that referenced this pull request Feb 24, 2025
Replace `public_test_dep!` by placing optionally public items into new
modules, then controlling what is exported with the `public-test-deps`
feature.

This is nicer for automatic formatting and diagnostics.

This is a reland of 2e2a925 ("Eliminate the use of
`public_test_dep!`"), which was reverted in 47e50fd ('Revert "Eliminate
the use of..."') due to a bug exposed at [1], reapplied in d4abaf4
because the issue should have been fixed in [2], then reverted again in
f6eef07 because [2] did not actually fix the issue.

[3] has landed in rust-lang/rust since then, which should resolve the
last problem remaining after [2]. So, apply this change for what is
hopefully the final time.

[1]: rust-lang/rust#128691
[2]: rust-lang/rust#135278
[3]: rust-lang/rust#135501
tgross35 added a commit to rust-lang/compiler-builtins that referenced this pull request Feb 24, 2025
Replace `public_test_dep!` by placing optionally public items into new
modules, then controlling what is exported with the `public-test-deps`
feature.

This is nicer for automatic formatting and diagnostics.

This is a reland of 2e2a925 ("Eliminate the use of
`public_test_dep!`"), which was reverted in 47e50fd ('Revert "Eliminate
the use of..."') due to a bug exposed at [1], reapplied in d4abaf4
because the issue should have been fixed in [2], then reverted again in
f6eef07 because [2] did not actually fix the issue.

[3] has landed in rust-lang/rust since then, which should resolve the
last problem remaining after [2]. So, apply this change for what is
hopefully the final time.

[1]: rust-lang/rust#128691
[2]: rust-lang/rust#135278
[3]: rust-lang/rust#135501
RalfJung pushed a commit to RalfJung/miri that referenced this pull request Feb 24, 2025
Inject `compiler_builtins` during postprocessing and ensure it is made private

Follow up of rust-lang/rust#135278

Do the following:

* Inject `compiler_builtins` during postprocessing, rather than injecting `extern crate compiler_builtins as _` into the AST
* Do not make dependencies of `std` private by default (this was added in #135278)
* Make sure sysroot crates correctly mark their dependencies private/public
* Ensure that marking a dependency private makes its dependents private by default as well, unless otherwise specified
* Do the `compiler_builtins` update that has been blocked on this

There is more detail in the commit messages. This includes the changes I was working on in rust-lang/rust#136226.

try-job: test-various
try-job: x86_64-msvc-1
try-job: x86_64-msvc-2
try-job: i686-mingw-1
try-job: i686-mingw-2
github-merge-queue bot pushed a commit to rust-lang/rust-analyzer that referenced this pull request Feb 24, 2025
Inject `compiler_builtins` during postprocessing and ensure it is made private

Follow up of rust-lang/rust#135278

Do the following:

* Inject `compiler_builtins` during postprocessing, rather than injecting `extern crate compiler_builtins as _` into the AST
* Do not make dependencies of `std` private by default (this was added in #135278)
* Make sure sysroot crates correctly mark their dependencies private/public
* Ensure that marking a dependency private makes its dependents private by default as well, unless otherwise specified
* Do the `compiler_builtins` update that has been blocked on this

There is more detail in the commit messages. This includes the changes I was working on in rust-lang/rust#136226.

try-job: test-various
try-job: x86_64-msvc-1
try-job: x86_64-msvc-2
try-job: i686-mingw-1
try-job: i686-mingw-2
bjorn3 pushed a commit to rust-lang/rustc_codegen_cranelift that referenced this pull request Feb 24, 2025
Inject `compiler_builtins` during postprocessing and ensure it is made private

Follow up of rust-lang/rust#135278

Do the following:

* Inject `compiler_builtins` during postprocessing, rather than injecting `extern crate compiler_builtins as _` into the AST
* Do not make dependencies of `std` private by default (this was added in #135278)
* Make sure sysroot crates correctly mark their dependencies private/public
* Ensure that marking a dependency private makes its dependents private by default as well, unless otherwise specified
* Do the `compiler_builtins` update that has been blocked on this

There is more detail in the commit messages. This includes the changes I was working on in rust-lang/rust#136226.

try-job: test-various
try-job: x86_64-msvc-1
try-job: x86_64-msvc-2
try-job: i686-mingw-1
try-job: i686-mingw-2
github-actions bot pushed a commit to tautschnig/verify-rust-std that referenced this pull request Mar 11, 2025
…te, r=bjorn3

Inject `compiler_builtins` during postprocessing and ensure it is made private

Follow up of rust-lang#135278

Do the following:

* Inject `compiler_builtins` during postprocessing, rather than injecting `extern crate compiler_builtins as _` into the AST
* Do not make dependencies of `std` private by default (this was added in rust-lang#135278)
* Make sure sysroot crates correctly mark their dependencies private/public
* Ensure that marking a dependency private makes its dependents private by default as well, unless otherwise specified
* Do the `compiler_builtins` update that has been blocked on this

There is more detail in the commit messages. This includes the changes I was working on in rust-lang#136226.

try-job: test-various
try-job: x86_64-msvc-1
try-job: x86_64-msvc-2
try-job: i686-mingw-1
try-job: i686-mingw-2
github-actions bot pushed a commit to tautschnig/verify-rust-std that referenced this pull request Mar 11, 2025
…te, r=bjorn3

Inject `compiler_builtins` during postprocessing and ensure it is made private

Follow up of rust-lang#135278

Do the following:

* Inject `compiler_builtins` during postprocessing, rather than injecting `extern crate compiler_builtins as _` into the AST
* Do not make dependencies of `std` private by default (this was added in rust-lang#135278)
* Make sure sysroot crates correctly mark their dependencies private/public
* Ensure that marking a dependency private makes its dependents private by default as well, unless otherwise specified
* Do the `compiler_builtins` update that has been blocked on this

There is more detail in the commit messages. This includes the changes I was working on in rust-lang#136226.

try-job: test-various
try-job: x86_64-msvc-1
try-job: x86_64-msvc-2
try-job: i686-mingw-1
try-job: i686-mingw-2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
merged-by-bors This PR was explicitly merged by bors. S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Diagnostics sometimes suggest items from rustc_private crates
8 participants