-
Notifications
You must be signed in to change notification settings - Fork 13.5k
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
Closed
Rollup of 11 pull requests #144038
+2,055
−1,240
Conversation
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
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.
…r_size` feature on some targets
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``
@bors r+ rollup=never p=5 |
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
The job Click to see the possible cause of the failure (guessed by this bot)
|
💔 Test failed - checks-actions |
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.
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:
const_make_global
; err forconst_allocate
ptrs if didn't call #143595 (addconst_make_global
; err forconst_allocate
ptrs if didn't call)optimize_for_size
feature on some targets #143820 (Fixed a core crate compilation failure when enabling theoptimize_for_size
feature on some targets)BorrowedCursor
API #143829 (TrimBorrowedCursor
API)#[coverage]
to the new attribute system #143891 (Port#[coverage]
to the new attribute system)r? @ghost
@rustbot modify labels: rollup
Create a similar rollup