-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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
Use diagnostic namespace in stdlib #119216
Use diagnostic namespace in stdlib #119216
Conversation
This comment has been minimized.
This comment has been minimized.
69b1c88
to
3350e5b
Compare
This comment has been minimized.
This comment has been minimized.
Can you add a UI test with |
@rustbot author |
I've pushed 4ed3257 to add the requested test. There is already https://github.com/rust-lang/rust/blob/master/tests/ui/diagnostic_namespace/feature-gate-diagnostic_namespace.rs for testing that the feature gate is required for using the whole namespace. @rustbot reviwer |
@rustbot label -S-waiting-on-author +S-waiting-on-review |
This comment has been minimized.
This comment has been minimized.
Can you find out what is up with that failing rustdoc test? @rustbot author (also you can use |
4ed3257
to
cc31adc
Compare
@rustbot ready |
@@ -10,7 +10,7 @@ where | |||
|
|||
// @has no_redundancy/struct.Outer.html | |||
// @has - '//*[@id="synthetic-implementations-list"]//*[@class="impl"]//h3[@class="code-header"]' \ | |||
// "impl<T> Send for Outer<T>where T: Send + Copy" | |||
// "impl<T> Send for Outer<T>where T: Copy + Send" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why does this fix a test?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Me being quite familiar with src/librustdoc/clean/
, I presume that this is rustdoc's fault.
rustdoc still uses a lot of FxHash{Set,Map}
s in its code base (20 occurrences of them in total in clean/auto_trait.rs
which is responsible for generating this Send
impl).
I'm not sure why exactly it manifests like that but FxHash{Set,Map}
(while stable under re-runs & recompilations of core and rustdoc) is “unstable under rmeta
changes”. Since this PR has modified core
(more specificallySend
), core
's rmeta
file has changed and rustdoc being rustdoc now generates different output. Mind you, this will stay like that, it's not a flaky test (at least if my theory checks out).
To give you another example, in PR #116388 I was able to get rid of several cases of this “instability” in rustdoc. Check out the Example <details/>
in the PR description.
@compiler-errors, since this is a bug in rustdoc and we can't do anything short-term here, this PR shouldn't be blocked on it. I officially approve the rustdoc test changes, so to say ^^.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've just opened #119597 for that.
@bors r+ |
…in_stdlib, r=compiler-errors Use diagnostic namespace in stdlib This required a minor fix to have the diagnostics shown in third party crates when the `diagnostic_namespace` feature is not enabled. See rust-lang@5d63f5d for details. I've opted for having a single PR for both changes as it's really not that much code. If it is required it should be easy to split up the change into several PR's. r? `@compiler-errors`
…iaskrgr Rollup of 7 pull requests Successful merges: - rust-lang#118680 (Add support for shell argfiles) - rust-lang#119216 (Use diagnostic namespace in stdlib) - rust-lang#119350 (Imply outlives-bounds on lazy type aliases) - rust-lang#119538 (Cleanup error handlers: round 5) - rust-lang#119563 (Check yield terminator's resume type in borrowck) - rust-lang#119577 (Migrate memory overlap check from validator to lint) - rust-lang#119589 (cstore: Remove unnecessary locking from `CrateMetadata`) Failed merges: - rust-lang#119591 (rustc_mir_transform: Make DestinationPropagation stable for queries) r? `@ghost` `@rustbot` modify labels: rollup
Oh no, the order swapped again in a rollup, see #119609 (comment). Since I still assume that this isn't a flaky test, some PR inside that rollup might have had an effect? Unapproving for now, maybe until all the PRs from that rollup have been merged? @weiznich, in the meantime you could rebase this branch to see if this issue has fixed itself or if CI still fails (maybe my theory #119597 doesn't check out 😅). @bors r- |
If it comes to the worst and CI still fails you can also Sorry for the bad contributor experience :/ |
nightly feature (Using this attribute still requires a nightly feature, this just enables that this feature does not need to be enabled on the child crate as well)
`#[diagnostic::on_unimplemented]` This commit replaces those `#[rustc_on_unimplemented]` attributes with their equivalent `#[diagnostic::on_unimplemented]` where this is supported (So no filter or any extended option)
the corresponding feature.
cc31adc
to
7a6c740
Compare
I've pushed a rebased version, but at least according to my local tests that does not change anything (the test continues to pass without any change compared to the old PR version). |
Alright, let me take over for a sec (i.e., no pulls from and pushes to this branch). Imma run an experiment... |
@bors try |
…_stdlib, r=<try> Use diagnostic namespace in stdlib This required a minor fix to have the diagnostics shown in third party crates when the `diagnostic_namespace` feature is not enabled. See rust-lang@5d63f5d for details. I've opted for having a single PR for both changes as it's really not that much code. If it is required it should be easy to split up the change into several PR's. r? `@compiler-errors`
☀️ Try build successful - checks-actions |
7a6c740
to
54967d7
Compare
…in_stdlib, r=compiler-errors Use diagnostic namespace in stdlib This required a minor fix to have the diagnostics shown in third party crates when the `diagnostic_namespace` feature is not enabled. See rust-lang@5d63f5d for details. I've opted for having a single PR for both changes as it's really not that much code. If it is required it should be easy to split up the change into several PR's. r? ``@compiler-errors``
…mpiler-errors Rollup of 9 pull requests Successful merges: - rust-lang#119208 (coverage: Hoist some complex code out of the main span refinement loop) - rust-lang#119216 (Use diagnostic namespace in stdlib) - rust-lang#119414 (bootstrap: Move -Clto= setting from Rustc::run to rustc_cargo) - rust-lang#119420 (Handle ForeignItem as TAIT scope.) - rust-lang#119468 (rustdoc-search: tighter encoding for f index) - rust-lang#119628 (remove duplicate test) - rust-lang#119638 (fix cyle error when suggesting to use associated function instead of constructor) - rust-lang#119640 (library: Fix warnings in rtstartup) - rust-lang#119642 (library: Fix a symlink test failing on Windows) r? `@ghost` `@rustbot` modify labels: rollup
Rollup merge of rust-lang#119216 - weiznich:use_diagnostic_namespace_in_stdlib, r=compiler-errors Use diagnostic namespace in stdlib This required a minor fix to have the diagnostics shown in third party crates when the `diagnostic_namespace` feature is not enabled. See rust-lang@5d63f5d for details. I've opted for having a single PR for both changes as it's really not that much code. If it is required it should be easy to split up the change into several PR's. r? `@compiler-errors`
This required a minor fix to have the diagnostics shown in third party crates when the
diagnostic_namespace
feature is not enabled. See 5d63f5d for details. I've opted for having a single PR for both changes as it's really not that much code. If it is required it should be easy to split up the change into several PR's.r? @compiler-errors