-
Notifications
You must be signed in to change notification settings - Fork 13.8k
Rollup of 14 pull requests #147326
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 #147326
+1,585
−924
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
If a user does e.g. impl From<Bar> for foo::Foo and get a compilation error about that `From<Bar>` is not implemented for `Foo`, check if multiple versions of the crate with `Foo` is present in the dependency graph. If so, give a hint about it. I encountered this case in the wild and didn't realize I had multiple versions of a crate in my dependency graph. So I was a bit confused at first. This fix will make life easier for others.
Partially revert a535042 Even with non-LLVM codegen backends, we want to allow for annotations that express dependencies to LLVM-specific parts of the test suite. This includes `//@ needs-llvm-components`, which just allows checking that LLVM is built with relevant target support before the test is run. It does not assert the test cannot work with another codegen backend.
This commit adds some documentation about the state of `-Cpanic=unwind` for the following wasm targets: * `wasm32-unknown-unknown` * `wasm32-wasip1` * `wasm32-wasip2` * `wasm32v1-none` Notably it's possible to use `-Cpanic=unwind` with `-Zbuild-std` and it's also mentioned that there are no concrete proposals at this time to adding a new set of targets which support unwinding. My hunch is that in a few years' time it would make sense to enable it by default on these targets (except for `wasm32v1-none`) but that's a problem for future folks to debate. For now this is an attempt to document the status quo.
illumos' `ld` does not support a flag like either SHF_GNU_RETAIN or SHF_SUNW_NODISCARD, so there is no way to communicate `#[used(linker)]` for that target. Setting `USED_LINKER` to try results in LLVM setting SHF_SUNW_NODISCARD for Solaris-like targets, which is an unknown section header flag for illumos `ld` and prevents sections from being merged that otherwise would. As a motivating example, the `inventory` crate produces `#[used]` items to merge into `.init_array`. Because those items have an unknown section header flag they are not merged with the default `.init_array` with `frame_dummy`, and end up never executed. Downgrading `#[used]` to `#[used(compiler)]` on illumos keeps so-attributed items as preserved as they had been before rust-lang#140872. As was the case before that change, because rustc passes `-z ignore` to illumos `ld`, it's possible that `used` sections are GC'd at link time. rust-lang#146169 describes this unfortunate circumstance.
…-syntax, r=ibraheemdev,fmease Document fully-qualified syntax in `as`' keyword doc
…mmerjake,tgross35 add CloneFromCell and Cell::get_cloned Tracking issue: rust-lang#145329
Bump unicode_data and printables to version 17.0.0 Unicode 17 ~~is not stable yet (release planned for 2025-09-09).~~ [has been released!](https://www.unicode.org/versions/Unicode17.0.0/) Update Unicode data and printables to [Unicode 17](https://www.unicode.org/versions/Unicode17.0.0/)
…ocs, r=tgross35 Fix atan2 inaccuracy in documentation Fixes rust-lang#136275
…cm,tgross35 add mem::conjure_zst Tracking issue: rust-lang#95383
…ieyouxu compiler: Hint at multiple crate versions if trait impl is for wrong ADT If a user does e.g. impl From<Bar> for foo::Foo and get a compilation error about that `From<Bar>` is not implemented for `Foo`, check if multiple versions of the crate with `Foo` is present in the dependency graph. If so, give a hint about it. Note that a test is added as a separate commit so it is easy to see what effect the fix has on the emitted error message. This can be seen as a continuation of rust-lang#124944. I think this closes RUST-71693 but I haven't checked since it lacks a minimal reproducer. If this gets merged I'll ask that reporter if this fix works for them. ## Real world example I encountered this case in the wild and didn't realize I had multiple versions of a crate in my dependency graph. So I was a bit confused at first. For reference, here is what that looked like. <details> <summary>Click to expand</summary> ### Before fix ``` error[E0277]: the trait bound `lambda_http::lambda_runtime::Diagnostic: From<Error>` is not satisfied --> src/main.rs:73:5 | 73 | lambda_http::run(service_fn(handle_event)).await | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `From<Error>` is not implemented for `lambda_http::lambda_runtime::Diagnostic` | = help: the following other types implement trait `From<T>`: `lambda_http::lambda_runtime::Diagnostic` implements `From<&str>` `lambda_http::lambda_runtime::Diagnostic` implements `From<Box<dyn StdError + Send + Sync>>` `lambda_http::lambda_runtime::Diagnostic` implements `From<Box<dyn StdError>>` `lambda_http::lambda_runtime::Diagnostic` implements `From<Infallible>` `lambda_http::lambda_runtime::Diagnostic` implements `From<lambda_runtime::deserializer::DeserializeError>` `lambda_http::lambda_runtime::Diagnostic` implements `From<std::io::Error>` `lambda_http::lambda_runtime::Diagnostic` implements `From<std::string::String>` = note: required for `Error` to implement `Into<lambda_http::lambda_runtime::Diagnostic>` note: required by a bound in `lambda_http::run` --> /home/martin/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/lambda_http-0.17.0/src/lib.rs:199:26 | 194 | pub async fn run<'a, R, S, E>(handler: S) -> Result<(), Error> | --- required by a bound in this function ... 199 | E: std::fmt::Debug + Into<Diagnostic>, | ^^^^^^^^^^^^^^^^ required by this bound in `run` error[E0277]: the trait bound `lambda_http::lambda_runtime::Diagnostic: From<Error>` is not satisfied --> src/main.rs:73:48 | 73 | lambda_http::run(service_fn(handle_event)).await | ^^^^^ the trait `From<Error>` is not implemented for `lambda_http::lambda_runtime::Diagnostic` | = help: the following other types implement trait `From<T>`: `lambda_http::lambda_runtime::Diagnostic` implements `From<&str>` `lambda_http::lambda_runtime::Diagnostic` implements `From<Box<dyn StdError + Send + Sync>>` `lambda_http::lambda_runtime::Diagnostic` implements `From<Box<dyn StdError>>` `lambda_http::lambda_runtime::Diagnostic` implements `From<Infallible>` `lambda_http::lambda_runtime::Diagnostic` implements `From<lambda_runtime::deserializer::DeserializeError>` `lambda_http::lambda_runtime::Diagnostic` implements `From<std::io::Error>` `lambda_http::lambda_runtime::Diagnostic` implements `From<std::string::String>` = note: required for `Error` to implement `Into<lambda_http::lambda_runtime::Diagnostic>` note: required by a bound in `lambda_http::run` --> /home/martin/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/lambda_http-0.17.0/src/lib.rs:199:26 | 194 | pub async fn run<'a, R, S, E>(handler: S) -> Result<(), Error> | --- required by a bound in this function ... 199 | E: std::fmt::Debug + Into<Diagnostic>, | ^^^^^^^^^^^^^^^^ required by this bound in `run` For more information about this error, try `rustc --explain E0277`. error: could not compile `auto-merge-dependabot-pull-requests-webhook` (bin "auto-merge-dependabot-pull-requests-webhook") due to 2 previous errors ``` ### After fix ``` Compiling auto-merge-dependabot-pull-requests-webhook v0.1.0 (/home/martin/src/auto-merge-dependabot-prs/rust-webhook) error[E0277]: the trait bound `lambda_http::lambda_runtime::Diagnostic: From<Error>` is not satisfied --> src/main.rs:73:5 | 73 | lambda_http::run(service_fn(handle_event)).await | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `From<Error>` is not implemented for `lambda_http::lambda_runtime::Diagnostic` | help: item with same name found --> /home/martin/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/lambda_runtime-0.13.0/src/diagnostic.rs:43:1 | 43 | pub struct Diagnostic { | ^^^^^^^^^^^^^^^^^^^^^ = note: perhaps two different versions of crate `lambda_runtime` are being used? = help: the following other types implement trait `From<T>`: `lambda_http::lambda_runtime::Diagnostic` implements `From<&str>` `lambda_http::lambda_runtime::Diagnostic` implements `From<Box<dyn StdError + Send + Sync>>` `lambda_http::lambda_runtime::Diagnostic` implements `From<Box<dyn StdError>>` `lambda_http::lambda_runtime::Diagnostic` implements `From<Infallible>` `lambda_http::lambda_runtime::Diagnostic` implements `From<lambda_runtime::deserializer::DeserializeError>` `lambda_http::lambda_runtime::Diagnostic` implements `From<std::io::Error>` `lambda_http::lambda_runtime::Diagnostic` implements `From<std::string::String>` = note: required for `Error` to implement `Into<lambda_http::lambda_runtime::Diagnostic>` note: required by a bound in `lambda_http::run` --> /home/martin/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/lambda_http-0.17.0/src/lib.rs:199:26 | 194 | pub async fn run<'a, R, S, E>(handler: S) -> Result<(), Error> | --- required by a bound in this function ... 199 | E: std::fmt::Debug + Into<Diagnostic>, | ^^^^^^^^^^^^^^^^ required by this bound in `run` error[E0277]: the trait bound `lambda_http::lambda_runtime::Diagnostic: From<Error>` is not satisfied --> src/main.rs:73:48 | 73 | lambda_http::run(service_fn(handle_event)).await | ^^^^^ the trait `From<Error>` is not implemented for `lambda_http::lambda_runtime::Diagnostic` | help: item with same name found --> /home/martin/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/lambda_runtime-0.13.0/src/diagnostic.rs:43:1 | 43 | pub struct Diagnostic { | ^^^^^^^^^^^^^^^^^^^^^ = note: perhaps two different versions of crate `lambda_runtime` are being used? = help: the following other types implement trait `From<T>`: `lambda_http::lambda_runtime::Diagnostic` implements `From<&str>` `lambda_http::lambda_runtime::Diagnostic` implements `From<Box<dyn StdError + Send + Sync>>` `lambda_http::lambda_runtime::Diagnostic` implements `From<Box<dyn StdError>>` `lambda_http::lambda_runtime::Diagnostic` implements `From<Infallible>` `lambda_http::lambda_runtime::Diagnostic` implements `From<lambda_runtime::deserializer::DeserializeError>` `lambda_http::lambda_runtime::Diagnostic` implements `From<std::io::Error>` `lambda_http::lambda_runtime::Diagnostic` implements `From<std::string::String>` = note: required for `Error` to implement `Into<lambda_http::lambda_runtime::Diagnostic>` note: required by a bound in `lambda_http::run` --> /home/martin/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/lambda_http-0.17.0/src/lib.rs:199:26 | 194 | pub async fn run<'a, R, S, E>(handler: S) -> Result<(), Error> | --- required by a bound in this function ... 199 | E: std::fmt::Debug + Into<Diagnostic>, | ^^^^^^^^^^^^^^^^ required by this bound in `run` For more information about this error, try `rustc --explain E0277`. error: could not compile `auto-merge-dependabot-pull-requests-webhook` (bin "auto-merge-dependabot-pull-requests-webhook") due to 2 previous errors ``` </details>
…oratrieb interpret `#[used]` as `#[used(compiler)]` on illumos helps rust-lang#146169 not be as painful: fixes the illumos regression in rust-lang#140872, but `#[used(linker)]` is still erroneous on illumos generally. illumos' `ld` does not support a flag like either SHF_GNU_RETAIN or SHF_SUNW_NODISCARD, so there is no way to communicate `#[used(linker)]` for that target. Setting `USED_LINKER` to try results in LLVM setting SHF_SUNW_NODISCARD for Solaris-like targets, which is an unknown section header flag for illumos `ld` and prevents sections from being merged that otherwise would. As a motivating example, the `inventory` crate produces `#[used]` items to merge into `.init_array`. Because those items have an unknown section header flag they are not merged with the default `.init_array` with `frame_dummy`, and end up never executed. Downgrading `#[used]` to `#[used(compiler)]` on illumos keeps so-attributed items as preserved as they had been before rust-lang#140872. As was the case before that change, because rustc passes `-z ignore` to illumos `ld`, it's possible that `used` sections are GC'd at link time. rust-lang#146169 describes this unfortunate circumstance. ---- as it turns out, `tests/ui/attributes/used_with_archive.rs` had broken on `x86_64-unknown-illumos`, and this patch fixes it. the trials and tribulations of tier 2 :( r? `@Noratrieb` probably?
…ross35 std: `sys::net` cleanups This PR contains three improvements to the socket-based networking implementation (aa1263e is just to add the now missing `unsafe`). Best reviewed commit-by-commit.
…nt-change, r=lcnr Do not assert that a change in global cache only happens when concurrent Fixes rust-lang/trait-system-refactor-initiative#234 I think it should just be safe to remove this assert (rather than delaying a bug). If the previous and current result are the same, I wouldn't expect issues. r? lcnr
compiletest: Make `DirectiveLine` responsible for name/value splitting - Follow-up to rust-lang#147170. --- Now that all of the directive-parsing functions have access to a `DirectiveLine`, we can move all of the ad-hoc name/value splitting code into `DirectiveLine` itself, making directive parsing simpler and more consistent. The first commit is just moving code into a submodule, so the actual changes can be seen in the subsequent commits. r? jieyouxu
…r=jieyouxu Add documentation about unwinding to wasm targets This commit adds some documentation about the state of `-Cpanic=unwind` for the following wasm targets: * `wasm32-unknown-unknown` * `wasm32-wasip1` * `wasm32-wasip2` * `wasm32v1-none` Notably it's possible to use `-Cpanic=unwind` with `-Zbuild-std` and it's also mentioned that there are no concrete proposals at this time to adding a new set of targets which support unwinding. My hunch is that in a few years' time it would make sense to enable it by default on these targets (except for `wasm32v1-none`) but that's a problem for future folks to debate. For now this is an attempt to document the status quo.
…youxu bless autodiff batching test This pr blesses a broken test and unblocks running rust in the Enzyme CI: EnzymeAD/Enzyme#2430 Enzyme is the plugin used by our std::autodiff and (future) std::batching modules, both of which are not build by default. In the near future we also hope to enable std::autodiff in the Rust CI. This test is the only one to combine two features, automatic differentiation and batching/vectorization. This combination is even more experimental than either feature on its own. I have a wip branch in which I enable more vectorization/batching and as part of that I'll think more about how to write those tests in a robust way (and likely change the interface). Until that lands, I don't care too much about what specific IR we generate here; it's just nice to track changes. r? compiler
…r=jieyouxu Fix top level ui tests check in tidy I got an error when pushing code: ```console fmt check fmt: checked 6330 modified files tidy check tidy [ui_tests (tests)]: ui tests should be added under meaningful subdirectories: `/Users/yukang/rust/tests/ui/.DS_Store` tidy [ui_tests (tests)]: FAIL ``` I think it's better to use `ignore::WalkBuilder` for checking the path. r? ``@jieyouxu``
bors
added a commit
that referenced
this pull request
Oct 4, 2025
Rollup of 14 pull requests Successful merges: - #142670 (Document fully-qualified syntax in `as`' keyword doc) - #145685 (add CloneFromCell and Cell::get_cloned) - #146330 (Bump unicode_data and printables to version 17.0.0) - #146451 (Fix atan2 inaccuracy in documentation) - #146479 (add mem::conjure_zst) - #146874 (compiler: Hint at multiple crate versions if trait impl is for wrong ADT ) - #147117 (interpret `#[used]` as `#[used(compiler)]` on illumos) - #147190 (std: `sys::net` cleanups) - #147251 (Do not assert that a change in global cache only happens when concurrent) - #147280 (Return to needs-llvm-components being info-only) - #147288 (compiletest: Make `DirectiveLine` responsible for name/value splitting) - #147309 (Add documentation about unwinding to wasm targets) - #147315 (bless autodiff batching test) - #147323 (Fix top level ui tests check in tidy) 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-compiletest
Area: The compiletest test runner
A-run-make
Area: port run-make Makefiles to rmake.rs
A-testsuite
Area: The testsuite used to check the correctness of rustc
A-tidy
Area: The tidy tool
O-unix
Operating system: Unix-like
O-windows
Operating system: Windows
rollup
A PR which is a rollup
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:
as
' keyword doc #142670 (Document fully-qualified syntax inas
' keyword doc)#[used]
as#[used(compiler)]
on illumos #147117 (interpret#[used]
as#[used(compiler)]
on illumos)sys::net
cleanups #147190 (std:sys::net
cleanups)DirectiveLine
responsible for name/value splitting #147288 (compiletest: MakeDirectiveLine
responsible for name/value splitting)r? @ghost
@rustbot modify labels: rollup
Create a similar rollup