Skip to content

Rollup of 11 pull requests #144038

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

Closed
wants to merge 33 commits into from

Conversation

matthiaskrgr
Copy link
Member

@matthiaskrgr matthiaskrgr commented Jul 16, 2025

Successful merges:

r? @ghost
@rustbot modify labels: rollup

Create a similar rollup

a1phyr and others added 30 commits July 9, 2025 18:11
This method was not really useful: at no point one would only need to
read the initialized part of the cursor without mutating it.
I assume that this method was there for completeness, but there is
hardly any useful use of it: the buffer it gave was not always connected
to the start of the cursor and its use required `unsafe` anyway to mark
the bytes as initialized.
This enable removing the `start` field, so `BorrowedCursor` fits in a
single register. Because `written` is almost always used in difference
with another call, this changes nothing else in practice.
Key changes include:

- Removal of the word "syntax" from the lint message. More accurately,
  it could have been something like "syntax group" or "syntax
  category", but avoiding it completely is easier.
- The primary lint message now reflects exactly which mismatch is
  occurring, instead of trying to be general. A new `help` line is
  general across the mismatch kinds.
- Suggestions have been reduced to be more minimal, no longer also
  changing non-idiomatic but unrelated aspects.
- Suggestion text no longer mentions changes when those changes don't
  occur in that specific suggestion.
Co-Authored-By: Ralf Jung <post@ralfj.de>
Co-Authored-By: Oli Scherer <github333195615777966@oli-obk.de>
Co-Authored-By: Ralf Jung <post@ralfj.de>
There are many places that join path segments with `::` to produce a
string. A lot of these use `join("::")`. Many in rustdoc use
`join_with_double_colon`, and a few use `.joined("..")`. One in Clippy
uses `itertools::join`. A couple of them look for `kw::PathRoot` in the
first segment, which can be important.

This commit introduces `rustc_ast::join_path_{syms,ident}` to do the
joining for everyone. `rustc_ast` is as good a location for these as
any, being the earliest-running of the several crates with a `Path`
type. Two functions are needed because `Ident` printing is more complex
than simple `Symbol` printing.

The commit also removes `join_with_double_colon`, and
`estimate_item_path_byte_length` with it.

There are still a handful of places that join strings with "::" that are
unchanged. They are not that important: some of them are in tests, and
some of them first split a path around "::" and then rejoin with "::".

This fixes one test case where `{{root}}` shows up in an error message.
This one is a bit marginal, because the segments are a mix of symbols
and strings.
…r, r=RalfJung,fee1-dead

add `const_make_global`; err for `const_allocate` ptrs if didn't call

Implements as discussed on Zulip: [#t-compiler/const-eval > const heap](https://rust-lang.zulipchat.com/#narrow/channel/146212-t-compiler.2Fconst-eval/topic/const.20heap/with/527125421)

r? ```@rust-lang/wg-const-eval```

Fixes rust-lang#129233
Added error for invalid char cast

fixes rust-lang#143597

not really sure if I did it right, but according to cast-char test -- it is right, also this code gave me false positive result

```
for _ in 0..(256 as u8) {}
```

so this is why I added this check `if lit_val <= 0xFF`

Also I believe that error message could be improved, but I'm not sure how exactly

cc ```@hkBst```

r? compiler
Opaque type collection: Guard against endlessly recursing free alias types

See test description for technical details.

Fixes rust-lang#131994.

r? oli-obk (sry, your queue is large, so no rush & feel free to reassign)
…k-Simulacrum

Fixed a core crate compilation failure when enabling the `optimize_for_size` feature on some targets

This fixes rust-lang#143804.
…enton

Trim `BorrowedCursor` API

This PR removes some method from the unstable `BorrowedCursor` type. A rational for each change can be found in the message of each commit.

I don't think that an ACP is required for this, please tell me if it is not the case.

Cc rust-lang#78485 rust-lang#117693
…trochenkov

Linting public reexport of private dependencies

Part of public/private dependencies rust-lang#44663
Partially addresses rust-lang#71043

I'm adding a warning for reexports of private dependencies into `rustc_resolve`. I get that this should not be a warning, but should instead be a lint to be controlled by the feature gate, but I did not figure out how exactly to do that at that point. I tried doing the same thing as is done in `rustc_privacy`, but the linting system is not ready yet as far as I understand the error I got, so I made a warning for now instead. Some guidance on how to emit lints with `dcx` would be appreciated.

This also sets the `std_detect` crate as a public dependency of `std` because some macros are reexported from there. I did not check closer, but the other option may be to allow the specific reexports instead.
…szelmann

Port `#[coverage]` to the new attribute system

r? ```@jdonszelmann```
…taxes-rewording, r=traviscross,jieyouxu

Reword mismatched-lifetime-syntaxes text based on feedback

Key changes include:

- Removal of the word "syntax" from the lint message. More accurately, it could have been something like "syntax group" or "syntax category", but avoiding it completely is easier.
- The primary lint message now reflects exactly which mismatch is occurring, instead of trying to be general. A new `help` line is general across the mismatch kinds.
- Suggestions have been reduced to be more minimal, no longer also changing non-idiomatic but unrelated aspects.
- Suggestion text no longer mentions changes when those changes don't occur in that specific suggestion.

r? ```@jieyouxu```
Improve path segment joining

Currently paths are joined with `::` in many places, in a variety of ways. This PR unifies things.

r? ```@petrochenkov```
…cated-fields, r=jieyouxu

Remove deprecated fields in bootstrap

This PR removes deprecated fields:
1. `description` - part of rust toml
2. `ccache` - part of llvm toml
type_id_eq: check that the hash fully matches the type

The previous logic wouldn't always detect when the hash mismatches the provenance. Fix that by adding a new helper, `read_type_id`, that reads a single type ID while fully checking it for validity and consistency.

r? ``@oli-obk``
@rustbot rustbot added A-attributes Area: Attributes (`#[…]`, `#![…]`) S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) T-clippy Relevant to the Clippy team. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-libs Relevant to the library team, which will review and decide on the PR/issue. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. T-rustdoc-frontend Relevant to the rustdoc-frontend team, which will review and decide on the web UI/UX output. rollup A PR which is a rollup labels Jul 16, 2025
@matthiaskrgr
Copy link
Member Author

@bors r+ rollup=never p=5

@bors
Copy link
Collaborator

bors commented Jul 16, 2025

📌 Commit 3140424 has been approved by matthiaskrgr

It is now in the queue for this repository.

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Jul 16, 2025
@bors
Copy link
Collaborator

bors commented Jul 16, 2025

⌛ Testing commit 3140424 with merge c576bba...

bors added a commit that referenced this pull request Jul 16, 2025
Rollup of 11 pull requests

Successful merges:

 - #143595 (add `const_make_global`; err for `const_allocate` ptrs if didn't call)
 - #143678 (Added error for invalid char cast)
 - #143793 (Opaque type collection: Guard against endlessly recursing free alias types)
 - #143820 (Fixed a core crate compilation failure when enabling the `optimize_for_size` feature on some targets)
 - #143829 (Trim `BorrowedCursor` API)
 - #143856 (Linting public reexport of private dependencies)
 - #143891 (Port `#[coverage]` to the new attribute system)
 - #143914 (Reword mismatched-lifetime-syntaxes text based on feedback)
 - #143922 (Improve path segment joining)
 - #143926 (Remove deprecated fields in bootstrap)
 - #143975 (type_id_eq: check that the hash fully matches the type)

r? `@ghost`
`@rustbot` modify labels: rollup
@rust-log-analyzer
Copy link
Collaborator

The job dist-x86_64-linux-alt failed! Check out the build log: (web) (plain enhanced) (plain)

Click to see the possible cause of the failure (guessed by this bot)
[RUSTC-TIMING] askama_derive test:false 3.045
    Checking askama v0.14.0
[RUSTC-TIMING] askama test:false 0.439
 Documenting rustdoc v0.0.0 (/checkout/src/librustdoc)
error: unresolved link to `estimate_item_path_byte_length`
   --> src/librustdoc/html/url_parts_builder.rs:129:37
    |
129 | /// [estimating item path lengths]: estimate_item_path_byte_length
    |                                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ no item named `estimate_item_path_byte_length` in scope
    |
    = help: to escape `[` and `]` characters, add '\' before them like `\[` or `\]`
    = note: `-D rustdoc::broken-intra-doc-links` implied by `-D warnings`
    = help: to override `-D warnings` add `#[allow(rustdoc::broken_intra_doc_links)]`

error: could not document `rustdoc`
Command has failed. Rerun with -v to see more details.
Build completed unsuccessfully in 1:03:25
  local time: Wed Jul 16 21:47:37 UTC 2025
  network time: Wed, 16 Jul 2025 21:47:37 GMT
##[error]Process completed with exit code 1.
Post job cleanup.

@bors
Copy link
Collaborator

bors commented Jul 16, 2025

💔 Test failed - checks-actions

@bors bors added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Jul 16, 2025
@fmease fmease closed this Jul 16, 2025
@rustbot rustbot removed the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Jul 16, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-attributes Area: Attributes (`#[…]`, `#![…]`) rollup A PR which is a rollup T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) T-clippy Relevant to the Clippy team. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-libs Relevant to the library team, which will review and decide on the PR/issue. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. T-rustdoc-frontend Relevant to the rustdoc-frontend team, which will review and decide on the web UI/UX output.
Projects
None yet
Development

Successfully merging this pull request may close these issues.