-
Notifications
You must be signed in to change notification settings - Fork 13.4k
Rollup of 14 pull requests #142290
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 14 pull requests #142290
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
Signed-off-by: xizheyin <[email protected]>
Signed-off-by: xizheyin <[email protected]>
Signed-off-by: xizheyin <[email protected]>
…e methods via config
…ocation according to suggestions
…from the execution context, add getters and setters in the config, and update the tests and other relevant areas accordingly.
``` error: cannot find attribute `empty_helper` in this scope --> $DIR/derive-helper-legacy-limits.rs:17:3 | LL | #[empty_helper] | ^^^^^^^^^^^^ | help: `empty_helper` is an attribute that can be used by the derive macro `Empty`, you might be missing a `derive` attribute | LL + #[derive(Empty)] LL | struct S2; | ``` Look at proc-macro attributes when encountering unknown attribute ``` error: cannot find attribute `sede` in this scope --> src/main.rs:18:7 | 18 | #[sede(untagged)] | ^^^^ | help: the derive macros `Serialize` and `Deserialize` accept the similarly named `serde` attribute | 18 | #[serde(untagged)] | ~~~~~ error: cannot find attribute `serde` in this scope --> src/main.rs:12:7 | 12 | #[serde(untagged)] | ^^^^^ | = note: `serde` is in scope, but it is a crate, not an attribute help: `serde` is an attribute that can be used by the derive macros `Serialize` and `Deserialize`, you might be missing a `derive` attribute | 10 | #[derive(Serialize, Deserialize)] | ```
It's purely internal, and not intended to be a public API, even on nightly. This stops it showing up and being misleading in rustdoc search. It also mirrors the (also internal) `core::slice::sort` module.
This takes the current behavior of `file!` and documents it so it is safe to make assumptions about. For example, Cargo could provide a `CARGO_RUSTC_CURRENT_DIR` as a base path for `file!`. Example use cases - Being able to look up test assets relative to the current file ([example](https://github.com/rust-lang/cargo/blob/b9026bf654d7fac283465e58b8b76742244ef07d/tests/testsuite/cargo_add/add_basic/mod.rs#L34)) - Inline snapshotting libraries being able to update Rust source code ([example](https://github.com/rust-lang/cargo/blob/b9026bf654d7fac283465e58b8b76742244ef07d/tests/testsuite/alt_registry.rs#L36-L45)) T-libs-api discussed two solutions - `file_absolute!`: - Has less meaning in other build tools like buck2 - Bakes in the assumption that a full path is available (e.g. with trim-paths) - Specifying `file!`s behavior (this PR): - Leaves it to the user to deal with trim-paths - Even though `file!` is currently unspecified, changing it would likely have too large of an impact on the ecosystem at this time. A future possibility is that rustc could have a flag that controls modifies the base path used for `file!`. That seems purely additive with specifying the behavior and we do not want to block on it. It would also likely be too disruptive for Cargo users (as mentioned). However, we tried to keep this in mind when specifying the behavior.
…end trait methods
Co-authored-by: Ralf Jung <[email protected]>
…ing_docs, r=tgross35 docs: Small clarification on the usage of read_to_string and read_to_end trait methods Small clarification on the usage of read_to_string and read_to_end trait methods. The goal is to make it clear that these trait methods will become locked up if attempting to read to the end of stdin (which is a bit non-sensical unless the other end closes the pipe). Fixes: rust-lang#141714
Allow transmute casts in pre-runtime-MIR r? `@scottmcm` cc `@BoxyUwU` turns out in rust-lang#138393 I erroneously used transmute casts in https://github.com/rust-lang/rust/blob/fd3da4bebdff63b7529483ff7025986ef16bf463/compiler/rustc_mir_build/src/builder/matches/test.rs#L209 I don't think they have any issues using them before runtime, we just checked for them because we didn't have code exercising those code paths
…v, r=oli-obk deduplicate the rest of AST walker functions After this, we can tidy things up and deduplicate the visitor traits themselves too. Fixes rust-lang#139825, apparently r? `@oli-obk`
…inux-kernel-version-or-later, r=workingjubilee platform-support.md: Mention specific Linux kernel version or later To be consistent with notes for other targets... ~~(Only made the change for `aarch64-unknown-linux-gnu` for now, as that's fairly certain after looking at the `git blame` just to be sure.)~~
Mark `core::slice::memchr` as `#[doc(hidden)]` It's purely internal, and not intended to be a public API, even on nightly. This stops it showing up and being misleading in rustdoc search. It also mirrors the (also internal) `core::slice::sort` module.
…fferent-lints, r=RalfJung compiler: fn ptrs should hit different lints based on ABI I was looking closer at the code for linting on ABIs and realized a mistake was probably made during rebase or review. I think that for function pointers in the HIR, the lint that fires should probably depend on the ABI we encountered, e.g. if it's on the newly-deprecated set of ABIs or not. This will be slightly confusing for a little bit, but I think we can do more to reduce that confusion by switching `unsupported_fn_ptr_calling_conventions` to a hard error. r? `@RalfJung`
…i-obk const_eval: fix some outdated comments r? `@oli-obk`
@bors r+ rollup=neve p=5 |
@bors rollup=never |
@bors p=5 |
bors
added a commit
that referenced
this pull request
Jun 10, 2025
Rollup of 14 pull requests Successful merges: - #134442 (Specify the behavior of `file!`) - #134841 (Look at proc-macro attributes when encountering unknown attribute) - #140372 (Exhaustively handle parsed attributes in CheckAttr) - #140766 (Stabilize keylocker) - #141642 (Note the version and PR of removed features when using it) - #141909 (Add central execution context to bootstrap) - #141992 (use `#[naked]` for `__rust_probestack`) - #142102 (docs: Small clarification on the usage of read_to_string and read_to_end trait methods) - #142124 (Allow transmute casts in pre-runtime-MIR) - #142240 (deduplicate the rest of AST walker functions) - #142258 (platform-support.md: Mention specific Linux kernel version or later) - #142262 (Mark `core::slice::memchr` as `#[doc(hidden)]`) - #142271 (compiler: fn ptrs should hit different lints based on ABI) - #142288 (const_eval: fix some outdated comments) 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 (`#[…]`, `#![…]`)
A-compiler-builtins
Area: compiler-builtins (https://github.com/rust-lang/compiler-builtins)
A-LLVM
Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues.
rollup
A PR which is a rollup
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-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.
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:
file!
#134442 (Specify the behavior offile!
)#[naked]
for__rust_probestack
#141992 (use#[naked]
for__rust_probestack
)core::slice::memchr
as#[doc(hidden)]
#142262 (Markcore::slice::memchr
as#[doc(hidden)]
)r? @ghost
@rustbot modify labels: rollup
Create a similar rollup