Skip to content

Conversation

matthiaskrgr
Copy link
Member

Successful merges:

r? @ghost
@rustbot modify labels: rollup

Create a similar rollup

fmease and others added 16 commits May 23, 2025 11:08
slight grammar changes for clarity
… r=ChrisDenton

GetUserProfileDirectoryW is now documented to always store the size

Update to match MicrosoftDocs/sdk-api#1810

Also fix a bug in the Miri implementation while I am starting at that code...

r? ``@ChrisDenton``
Fixes rust-lang#141254
Make #[cfg(version)] respect RUSTC_OVERRIDE_VERSION_STRING

The `#[cfg(version(...))]` feature is currently under-tested. Part of it is the difficulty that it is hard to write a test that never changes, while the version of the Rust compiler indeed *does* change.

PR rust-lang#81468 added the first and so far only test of `#[cfg(version(...))]`'s functionality (there is one other test for the *syntax*, that also acts as feature gate). But that test uses a proc macro that parses the version: the text of the test doesn't contain the actual `#[cfg(version(...))]`.

This PR makes `#[cfg(version(...))]` respect `RUSTC_OVERRIDE_VERSION_STRING`, added by PR rust-lang#124339, allowing us to virtually pin the rustc version and write tests from all directions against some specific version.

The PR also adds a functional test of `#[cfg(version(...))]` that leverages `RUSTC_OVERRIDE_VERSION_STRING`.

Pulled out of rust-lang#141137.

Tracking issue: rust-lang#64796
…structural-match, r=spastorino

Dont walk into unsafe binders when emiting error for non-structural type match

Fixes rust-lang#141422.

The other two binder-having types are also special cased here, unsurprisingly.

r? oli-obk
…l, r=lcnr

Do not try to confirm non-dyn compatible method

See the comment I left in `compiler/rustc_hir_typeck/src/method/confirm.rs`.

If we have a receiver that does not deref to the `dyn Trait` we're assembling the method from, then we used to ICE, but that's something that is possible to encounter with arbitrary self types.

r? oli-obk
Fixes rust-lang#141419
Improve CONTRIBUTING.md grammar and clarity

slight grammar changes for clarity
Add 2nd Solaris target maintainer

Based on concenr here rust-lang/compiler-team#870 (comment) I propose my coleague ``@kulikjak`` as 2nd Solaris maintainer. He already did some work to Rust in past.
…eyouxu

Suggest correct `version("..")` predicate syntax in check-cfg

This PR specialize the `unexpected_cfgs` lint diagnostic to suggest correct `version("..")` predicate syntax when providing the key-value one, eg. `version = "1.27"`.

Fixes rust-lang#141440
r? `@jieyouxu`
@rustbot rustbot added A-attributes Area: Attributes (`#[…]`, `#![…]`) A-meta Area: Issues & PRs about the rust-lang/rust repository itself O-windows Operating system: Windows S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. 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. rollup A PR which is a rollup labels May 24, 2025
@matthiaskrgr
Copy link
Member Author

@bors r+ rollup=never p=5

@bors
Copy link
Collaborator

bors commented May 24, 2025

📌 Commit 8bd0ebd 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 May 24, 2025
@rust-log-analyzer
Copy link
Collaborator

The job x86_64-gnu-llvm-19 failed! Check out the build log: (web) (plain)

Click to see the possible cause of the failure (guessed by this bot)
#18 exporting to docker image format
#18 sending tarball 20.6s done
#18 DONE 27.6s
##[endgroup]
Setting extra environment values for docker:  --env ENABLE_GCC_CODEGEN=1 --env GCC_EXEC_PREFIX=/usr/lib/gcc/
[CI_JOB_NAME=x86_64-gnu-llvm-19]
[CI_JOB_NAME=x86_64-gnu-llvm-19]
debug: `DISABLE_CI_RUSTC_IF_INCOMPATIBLE` configured.
---
sccache: Listening on address 127.0.0.1:4226
##[group]Configure the build
configure: processing command line
configure: 
configure: build.configure-args := ['--build=x86_64-unknown-linux-gnu', '--llvm-root=/usr/lib/llvm-19', '--enable-llvm-link-shared', '--set', 'rust.randomize-layout=true', '--set', 'rust.thin-lto-import-instr-limit=10', '--set', 'build.print-step-timings', '--enable-verbose-tests', '--set', 'build.metrics', '--enable-verbose-configure', '--enable-sccache', '--disable-manage-submodules', '--enable-locked-deps', '--enable-cargo-native-static', '--set', 'rust.codegen-units-std=1', '--set', 'dist.compression-profile=balanced', '--dist-compression-formats=xz', '--set', 'rust.lld=false', '--disable-dist-src', '--release-channel=nightly', '--enable-debug-assertions', '--enable-overflow-checks', '--enable-llvm-assertions', '--set', 'rust.verify-llvm-ir', '--set', 'rust.codegen-backends=llvm,cranelift,gcc', '--set', 'llvm.static-libstdcpp', '--set', 'gcc.download-ci-gcc=true', '--enable-new-symbol-mangling']
configure: build.build          := x86_64-unknown-linux-gnu
configure: target.x86_64-unknown-linux-gnu.llvm-config := /usr/lib/llvm-19/bin/llvm-config
configure: llvm.link-shared     := True
configure: rust.randomize-layout := True
configure: rust.thin-lto-import-instr-limit := 10
---
4 LL | #[cfg(not(version = "1.48.0"))]
5    |           ^^^^^^^^^^^^^^^^^^
6    |
-    = help: expected names are: `FALSE` and `test` and 31 more
8    = help: to expect this configuration use `--check-cfg=cfg(version, values("1.48.0"))`
9    = note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg.html> for more information about checking conditional configuration
10    = note: `#[warn(unexpected_cfgs)]` on by default

+ help: there is a similar config predicate: `version("..")`
+    |
+ LL - #[cfg(not(version = "1.48.0"))]
+ LL + #[cfg(not(version("1.48.0")))]
+    |
11 
12 warning: 1 warning emitted
13 

Note: some mismatched output was normalized before being compared
- LL - #[cfg(not(version = "1.48.0"))] //~ WARN unexpected `cfg` condition name: `version`
- LL + #[cfg(not(version("1.48.0")))] //~ WARN unexpected `cfg` condition name: `version`
+ help: there is a similar config predicate: `version("..")`
+    |
+ LL - #[cfg(not(version = "1.48.0"))]
+ LL + #[cfg(not(version("1.48.0")))]
+    |


The actual stderr differed from the expected stderr
To update references, rerun the tests and pass the `--bless` flag
To only update this specific test, also pass `--test-args feature-gates/cfg-version-expand.rs`

error: 1 errors occurred comparing output.
status: exit status: 0
command: env -u RUSTC_LOG_COLOR RUSTC_ICE="0" RUSTC_OVERRIDE_VERSION_STRING="1.50.3" RUST_BACKTRACE="short" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/tests/ui/feature-gates/cfg-version-expand.rs" "-Zthreads=1" "-Zsimulate-remapped-rust-src-base=/rustc/FAKE_PREFIX" "-Ztranslate-remapped-path-to-local-path=no" "-Z" "ignore-directory-in-diagnostics-source-blocks=/cargo" "-Z" "ignore-directory-in-diagnostics-source-blocks=/checkout/vendor" "--sysroot" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2" "--target=x86_64-unknown-linux-gnu" "--check-cfg" "cfg(test,FALSE)" "-O" "--error-format" "json" "--json" "future-incompat" "-Ccodegen-units=1" "-Zui-testing" "-Zdeduplicate-diagnostics=no" "-Zwrite-long-types-to-disk=no" "-Cstrip=debuginfo" "-C" "prefer-dynamic" "-o" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/feature-gates/cfg-version-expand/a" "-A" "internal_features" "-Crpath" "-Cdebuginfo=0" "-Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers"
stdout: none
--- stderr -------------------------------
warning: unexpected `cfg` condition name: `version`
##[warning]  --> /checkout/tests/ui/feature-gates/cfg-version-expand.rs:15:11
   |
LL | #[cfg(not(version = "1.48.0"))] //~ WARN unexpected `cfg` condition name: `version`
   |           ^^^^^^^^^^^^^^^^^^
   |
   = help: to expect this configuration use `--check-cfg=cfg(version, values("1.48.0"))`
   = note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg.html> for more information about checking conditional configuration
   = note: `#[warn(unexpected_cfgs)]` on by default
help: there is a similar config predicate: `version("..")`
   |
LL - #[cfg(not(version = "1.48.0"))] //~ WARN unexpected `cfg` condition name: `version`
LL + #[cfg(not(version("1.48.0")))] //~ WARN unexpected `cfg` condition name: `version`
   |

warning: 1 warning emitted
------------------------------------------

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-attributes Area: Attributes (`#[…]`, `#![…]`) A-meta Area: Issues & PRs about the rust-lang/rust repository itself O-windows Operating system: Windows rollup A PR which is a rollup S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. 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.
Projects
None yet
Development

Successfully merging this pull request may close these issues.