Rollup of 13 pull requests#155407
Closed
GuillaumeGomez wants to merge 30 commits intorust-lang:mainfrom
Closed
Conversation
* Extend `core::char`'s documentation of casing issues * Fix typos * Fix typo Co-authored-by: GrigorenkoPV <GrigorenkoPV+github@yandex.ru> * Document maximum 3x character expansion This is guaranteed by Unicode. * Fix error in `str` casing method docs
Another interal change that shouldn't impact rustc users. To prepare for the upcoming split of visit_type, we reorganise the instances of `cx.tcx.try_normalize_erasing_regions(cx.typing_env(), ty).unwrap_or(ty)` into a helper function outside of the main structs.
We don't consider it a bug that users can't break on initialization of some non-zero sized types (see comment on `maximally-steppable` at the top of the file), so it does not make sense to consider it a bug that users can't break on initialization of some zero-sized types.
When a type alias is locally re-exported from a private module (an implicit inline), rustdoc drops its `cfg` attributes because it treats it like a standard un-inlined re-export. Since type aliases have no inner fields to carry the `cfg` badge (unlike structs or enums), the portability info is lost entirely. This patch explicitly preserves the target's `cfg` metadata when the generated item is a `TypeAliasItem`, ensuring the portability badge renders correctly without breaking standard cross-crate re-export behavior.
For no apparent reason it's in a different file to `Token` itself. This commit moves it.
`rustc_ast_pretty::pp` defines `Printer` and has a 346 line `impl Printer` block for it. `rustc_ast_pretty::pp::convenience` has another `impl Printer` block with 85 lines. `rustc_ast_pretty::helpers` has another `impl Printer` block with 45 lines. This commit merges the two small `impl Printer` blocks into the bigger one, because there is no good reason for them to be separate. Doing this eliminates the `rustc_ast_pretty::pp::convenience` and `rustc_ast_pretty::helpers` modules; no great loss given that they were small and had extremely generic names.
so that we can check whether a type implements the trait
…ility tool to work with rustdoc
c-variadic: fix implementation on `avr` tracking issue: rust-lang#44930 cc target maintainer @Patryk27 I ran into multiple issues, and although with this PR and a little harness I can run the test with qemu on avr, the implementation is perhaps not ideal. The problem we found is that on `avr` the `c_int/c_uint` types are `i16/u16`, and this was not handled in the c-variadic checks. Luckily there is a field in the target configuration that contains the targets `c_int_width`. However, this field is not actually used in `core` at all, there the 16-bit targets are just hardcoded. https://github.com/rust-lang/rust/blob/1500f0f47f5fe8ddcd6528f6c6c031b210b4eac5/library/core/src/ffi/primitives.rs#L174-L185 Perhaps we should expose this like endianness and pointer width? --- Finally there are some changes to the test to make it compile with `no_std`.
…Simulacrum,GuillaumeGomez Extend `core::char`'s documentation of casing issues (and fix a rustdoc bug) @rustbot label A-unicode A-docs
…, r=mejrs Remove AttributeSafety from BUILTIN_ATTRIBUTES Encodes the expected attribute safety in the attribute parsers, rather than in `BUILTIN_ATTRIBUTES`, with the goal of removing `BUILTIN_ATTRIBUTES` soon. We can remove the old attribute safety logic already because unparsed attributes, just like the as of yet unparsed lint attributes, need to be safe. r? @jdonszelmann (or @mejrs if you feel like doing it, since you are in T-compiler now 🎉)
… r=GuillaumeGomez rustdoc: preserve `doc(cfg)` on locally re-exported type aliases When a type alias is locally re-exported from a private module (an implicit inline), rustdoc drops its `cfg` attributes because it treats it like a standard un-inlined re-export. Since type aliases have no inner fields to carry the `cfg` badge (unlike structs or enums), the portability info is lost entirely. This patch explicitly preserves the target's `cfg` metadata when the generated item is a `TypeAliasItem`, ensuring the portability badge renders correctly without breaking standard cross-crate re-export behavior. Fixes rust-lang#154921
changed the information provided by (mut x) to mut x (Fix 155030) When trying to change a value without using mut in a for loop, the recommendation for this change is incorrect, so I am correcting it. resolve: rust-lang#155030
….1, r=petrochenkov ImproperCTypes: Move erasing_region_normalisation into helper function This is "part 1/3 of 2/3 of 1/2" of the original pull request rust-lang#134697 (refactor plus overhaul of the ImproperCTypes family of lints) (all pulls of this series of pulls are supersets of the previous pulls. If this pull is "too small" to be worth the effort, you can instead look at the next in the series) This pull is a small internal change among the efforts to refactor the ImproperCTypes lints, by moving some "unwrapping" code (`cx.tcx.try_normalize_erasing_regions`) into a helper function. r? petrochenkov
tests/debuginfo/basic-stepping.rs: Remove FIXME related to ZSTs We don't consider it a bug that users can't break on initialization of some non-zero sized types (see rust-lang#153941 and linked discussions), so it does not make sense to consider it a bug that users can't break on initialization of some zero-sized types. Closes rust-lang#97083 r? compiler (see rust-lang#155352)
…etty, r=WaffleLapkin Rearrange `rustc_ast_pretty` `rustc_ast_pretty` has two modules, `pp::convenience` and `helpers`, that are small and silly. This PR eliminates them. Details in the individual commits. r? @WaffleLapkin
triagebot: notify on diagnostic attribute changes Did I get this right? 😆
…item, r=Kivooeo Use `box_new` diagnostic item for Box::new suggestions When look this part of code, I noticed this FIXME and fixed it :)
…r=petrochenkov Small refactor of `QueryJob::latch` method We can use `Option::get_or_insert_with` to avoid unwrapping there.
…a, r=notriddle Tweak how the "copy path" rustdoc button works to allow some accessibility tool to work with rustdoc Fixes rust-lang#155032. It's a bit better in term of "fragility" to retrieve this information: no need to parse text anymore, just to retrieve content. However it relies on HTML. I added extra tests to ensure it won't break without notice. cc @Enyium r? @lolbinarycat
`as_ref_unchecked` docs link fix Fix what's probably a copy-paste-o in a docs link.
Member
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
Apr 17, 2026
Rollup of 13 pull requests Successful merges: - #152980 (c-variadic: fix implementation on `avr`) - #154491 (Extend `core::char`'s documentation of casing issues (and fix a rustdoc bug)) - #155354 (Remove AttributeSafety from BUILTIN_ATTRIBUTES) - #154970 (rustdoc: preserve `doc(cfg)` on locally re-exported type aliases) - #155095 (changed the information provided by (mut x) to mut x (Fix 155030)) - #155358 (ImproperCTypes: Move erasing_region_normalisation into helper function) - #155377 (tests/debuginfo/basic-stepping.rs: Remove FIXME related to ZSTs) - #155383 (Rearrange `rustc_ast_pretty`) - #155384 (triagebot: notify on diagnostic attribute changes) - #155386 (Use `box_new` diagnostic item for Box::new suggestions) - #155391 (Small refactor of `QueryJob::latch` method) - #155395 (Tweak how the "copy path" rustdoc button works to allow some accessibility tool to work with rustdoc) - #155396 (`as_ref_unchecked` docs link fix)
Collaborator
|
The job Click to see the possible cause of the failure (guessed by this bot) |
Contributor
|
💔 Test for a8b8376 failed: CI. Failed job:
|
Member
|
I can’t get any useful failure information out of the logs. Likely flaky, but let’s do a try job as an extra check: @bors try jobs=x86_64-msvc-1 |
This comment has been minimized.
This comment has been minimized.
rust-bors bot
pushed a commit
that referenced
this pull request
Apr 17, 2026
Rollup of 13 pull requests try-job: x86_64-msvc-1
Contributor
Contributor
|
This pull request was unapproved due to being closed. |
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:
avr#152980 (c-variadic: fix implementation onavr)core::char's documentation of casing issues (and fix a rustdoc bug) #154491 (Extendcore::char's documentation of casing issues (and fix a rustdoc bug))doc(cfg)on locally re-exported type aliases #154970 (rustdoc: preservedoc(cfg)on locally re-exported type aliases)rustc_ast_pretty#155383 (Rearrangerustc_ast_pretty)box_newdiagnostic item for Box::new suggestions #155386 (Usebox_newdiagnostic item for Box::new suggestions)QueryJob::latchmethod #155391 (Small refactor ofQueryJob::latchmethod)as_ref_uncheckeddocs link fix #155396 (as_ref_uncheckeddocs link fix)r? @ghost
Create a similar rollup