Rollup of 5 pull requests#158260
Closed
JonathanBrouwer wants to merge 11 commits into
Closed
Conversation
This is motivated by cargo-semver-checks wanting to work on the standard library, but that requires being able to filter out breaking changes to unstable items, so it can only flag breaking changes to stable items. This in turn is motivated by https://www.github.com/rust-lang/rust/issues/153486.
For s390x the vector registers are now stable. That they need the target feature is already part of the ERROR assertion
On wasm the crate metadata ends up in a custom section. It is not possible to refer to create symbols inside a custom section, so attempting to export it during linking will result in a linker error. This keeps the target spec flag to deny compiling rust dylibs for wasm, but may theoretically allow compiling wasm rust dylibs with a custom target spec. It will help with wasm proc-macros. And in the future we can try to flip the only-cdylib option to false on wasm.
…rk-Simulacrum Include AtomicU128/AtomicI128 in docs for any target Fixes rust-lang#130474 This is my first contribution, so I'll try to be as descriptive as possible of my process and thoughts. - **Environment**: Cross compiled in Macbook M1 Air - **Testing**: I replicated the bug and checked fixes with `./x doc library/core --target x86_64-unknown-linux-gnu` (building the std doc didn't seem to apply my local changes so I used the core doc) Check the screenshots below. - **Diffs**: I added `#[cfg(any(...,doc))]` to all required structs and implementations so the types would compile. Applying`target_has_atomic_equal_alignment` part wasn't explicitly necessary, but adding it reveals the whole methods (specifically `from_mut` and `from_mut_slice`). - **Thoughts**: Also wondered if additional messages should be written to notify the available targets, but the documentation already included the following sentence that seemed enough. - **Note:** This type is only available on platforms that support atomic loads and stores of `u128`/`i128` [Before] <img width="988" height="233" alt="image" src="https://github.com/user-attachments/assets/e22137c2-dfc9-4239-bd0d-75c5a2e2b84f" /> [After] <img width="988" height="281" alt="image" src="https://github.com/user-attachments/assets/8ae83cb0-46f5-4cff-a576-2183466c202f" /> --- After the first work, doc tests were failing in CI, so I added `#[$cfg_cas]` to all methods in the `atomic_int` macro to cover them. But I'm not really sure if all these changes are necessary (and appropriate). This also has a side-effect of stating "Available on target_has_atomic=128 only." for all methods with the attribute. Also not sure if this is a good behavior.. <img width="978" height="454" alt="image" src="https://github.com/user-attachments/assets/b052f713-c8a9-4314-96be-a2832a6b84f6" />
…=Mark-Simulacrum Fix linking for wasm with crate metadata included On wasm the crate metadata ends up in a custom section. It is not possible to refer to create symbols inside a custom section, so attempting to export it during linking will result in a linker error. This keeps the target spec flag to deny compiling rust dylibs for wasm, but may theoretically allow compiling wasm rust dylibs with a custom target spec. It will help with wasm proc-macros. And in the future we can try to flip the only-cdylib option to false on wasm. Extracted out of rust-lang#157709, but also helps with rust-lang#157590. r? @Mark-Simulacrum
…efactoring, r=petrochenkov Refactor `proc_macro_decls_static` During experiments in rust-lang#158024 I've noticed that we iterate over all `hir_free_items` and find `RustcProcMacroDecls` on each of them for rewrite of a single `Option` which is the result of the query. In this PR: - The seach for `RustcProcMacroDecls` attribute is moved into `hir_crate_items` and result is cached in `ModuleItems`, now we do not find `RustcProcMacroDecls` for each free item, we stop when it is found, - ~`self.crate_collector` is replaced with generic const `CRATE_COLLECTOR`, maybe will give perf. improvements.~ r? @petrochenkov
…mments, r=camelid update `asm_experimental_reg` comments Trivial bit of cleanup. For s390x the vector registers are now stable, so `asm_experimental_reg` is no longer needed. That they need the target feature is already part of the ERROR assertion. In the unstable book the title was incorrect.
…oc-json, r=GuillaumeGomez Include `Item::stability` info in rustdoc JSON. Include `Item::stability` info in rustdoc JSON, to enable tools like `cargo-semver-checks` to compute stability information and (eventually, soon™️) be used to catch accidental breaking changes in the Rust standard library (cc @Amanieu). Successor to rust-lang#154603 by @aDotInTheVoid, building directly on top of its commit. Differences relative to that PR: - Added `since` information for stable items. - `Stability` is now boxed to ensure a smaller bump in `Item` size. Most non-built-in crates won't have stability information, so minimizing that memory use is material for them. - We have well-defined stability semantics for items, optimizing for consistency with how existing JSON users already must perform reachability and `#[doc(hidden)]` analysis, instead of how rustdoc HTML presentation works. Note the detailed inline comment about this. - Tests and docs, which the original PR noted needed to be added. Other flavors of stability, such as const stability or default-body stability, are left as future work. r? @GuillaumeGomez **AI disclosure:** This PR is the product of a combination of manual work and AI tools. I secured approval in advance from the designated reviewer. I stand behind the quality of the code I'm submitting, and I vouch it's as good or better compared to if I had written every line by my own hand.
Contributor
Author
|
@bors r+ rollup=never p=5 |
Contributor
This comment has been minimized.
This comment has been minimized.
rust-bors Bot
pushed a commit
that referenced
this pull request
Jun 22, 2026
…uwer Rollup of 5 pull requests Successful merges: - #155811 (Include AtomicU128/AtomicI128 in docs for any target) - #158242 (Fix linking for wasm with crate metadata included) - #158119 (Refactor `proc_macro_decls_static`) - #158172 (update `asm_experimental_reg` comments) - #158230 (Include `Item::stability` info in rustdoc JSON.)
Collaborator
|
The job Click to see the possible cause of the failure (guessed by this bot) |
Collaborator
|
The job Click to see the possible cause of the failure (guessed by this bot) |
Contributor
|
💔 Test for 95ab846 failed: CI. Failed job:
|
Contributor
|
PR #155811, which is a member of this rollup, was unapproved. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Successful merges:
proc_macro_decls_static#158119 (Refactorproc_macro_decls_static)asm_experimental_regcomments #158172 (updateasm_experimental_regcomments)Item::stabilityinfo in rustdoc JSON. #158230 (IncludeItem::stabilityinfo in rustdoc JSON.)r? @ghost
Create a similar rollup