Commit graph

283107 commits

Author SHA1 Message Date
fuyangpengqi
4febd273e5 Fix some typos
Signed-off-by: fuyangpengqi <995764973@qq.com>
2025-03-04 16:05:32 +08:00
bors
fd17deacce Auto merge of #137959 - matthiaskrgr:rollup-62vjvwr, r=matthiaskrgr
Rollup of 12 pull requests

Successful merges:

 - #135767 (Future incompatibility warning `unsupported_fn_ptr_calling_conventions`: Also warn in dependencies)
 - #137852 (Remove layouting dead code for non-array SIMD types.)
 - #137863 (Fix pretty printing of unsafe binders)
 - #137882 (do not build additional stage on compiler paths)
 - #137894 (Revert "store ScalarPair via memset when one side is undef and the other side can be memset")
 - #137902 (Make `ast::TokenKind` more like `lexer::TokenKind`)
 - #137921 (Subtree update of `rust-analyzer`)
 - #137922 (A few cleanups after the removal of `cfg(not(parallel))`)
 - #137939 (fix order on shl impl)
 - #137946 (Fix docker run-local docs)
 - #137955 (Always allow rustdoc-json tests to contain long lines)
 - #137958 (triagebot.toml: Don't label `test/rustdoc-json` as A-rustdoc-search)

r? `@ghost`
`@rustbot` modify labels: rollup
2025-03-04 02:27:56 +00:00
bors
2010bba886 Auto merge of #137927 - matthiaskrgr:rollup-yj463ns, r=matthiaskrgr
Rollup of 9 pull requests

Successful merges:

 - #132388 (Implement `#[cfg]` in `where` clauses)
 - #134900 (Fix parsing of ranges after unary operators)
 - #136938 (Remove `:` from `stack-protector-heuristics-effect.rs` Filecheck Pattern)
 - #137054 (Make phantom variance markers transparent)
 - #137525 (Simplify parallelization in test-float-parse)
 - #137618 (Skip `tidy` in pre-push hook if the user is deleting a remote branch)
 - #137741 (Stop using `hash_raw_entry` in `CodegenCx::const_str`)
 - #137849 (Revert "Remove Win SDK 10.0.26100.0 from CI")
 - #137862 (ensure we always print all --print options in help)

r? `@ghost`
`@rustbot` modify labels: rollup
2025-03-03 22:57:01 +00:00
Matthias Krüger
5d093cb872
Rollup merge of #137958 - aDotInTheVoid:aDotInTheVoid-patch-2, r=jieyouxu
triagebot.toml: Don't label `test/rustdoc-json` as A-rustdoc-search

This happened because `test/rustdoc-js` is a prefix of `test/rustdoc-json`, and triagebot works on prefixes.

Maybe this should be fixed in triagebot, but this works now.

This happened on #137956 and #137955.
2025-03-03 20:47:17 +01:00
Matthias Krüger
e2d40b2d80
Rollup merge of #137955 - Noratrieb:rustdoc-json-long-lines, r=aDotInTheVoid,jieyouxu
Always allow rustdoc-json tests to contain long lines

The rustdoc-json test syntax often requires very long lines, so the checks for long lines aren't really useful.

`@aDotInTheVoid` told me she'd like this and

r? jieyouxu

you're gonna tell me that the implementation is terrible. at least the performance seems reasonable: 2.5s after and 2.5s before.
2025-03-03 20:47:17 +01:00
Matthias Krüger
61f3ec4416
Rollup merge of #137946 - ehuss:ci-docker-readme, r=Kobzol
Fix docker run-local docs

This fixes the docker run-local docs to have a valid cargo command.
2025-03-03 20:47:16 +01:00
Matthias Krüger
afb88ed68f
Rollup merge of #137939 - speedy-lex:shl-fix, r=Noratrieb
fix order on shl impl

this doesn't fix any bugs, it makes shl_impl_all! look more consistent with the other impl's in core/ops/bit.rs
2025-03-03 20:47:15 +01:00
Matthias Krüger
795af36d01
Rollup merge of #137922 - Zalathar:sharded, r=SparrowLii
A few cleanups after the removal of `cfg(not(parallel))`

I noticed a few small things that are no longer needed after the removal of `cfg(not(parallel))` in #132282.

One of the later changes adjusts several imports, so viewing the changes individually is recommended.

r? SparrowLii (or reroll)
2025-03-03 20:47:15 +01:00
Matthias Krüger
566f34c75a
Rollup merge of #137921 - lnicola:sync-from-ra, r=lnicola
Subtree update of `rust-analyzer`

r? `@ghost`
2025-03-03 20:47:14 +01:00
Matthias Krüger
decb0c9bad
Rollup merge of #137902 - nnethercote:ast-lexer-TokenKind, r=compiler-errors
Make `ast::TokenKind` more like `lexer::TokenKind`

This is step 2 of https://github.com/rust-lang/compiler-team/issues/831.

r? `@spastorino`
2025-03-03 20:47:13 +01:00
Matthias Krüger
70b9968d1e
Rollup merge of #137894 - compiler-errors:no-scalar-pair-opt, r=oli-obk
Revert "store ScalarPair via memset when one side is undef and the other side can be memset"

cc #137892
reverts #135335

r? oli-obk
2025-03-03 20:47:12 +01:00
Matthias Krüger
a4b6181156
Rollup merge of #137882 - onur-ozkan:remove-extra-compiler-stage, r=Kobzol
do not build additional stage on compiler paths

When calling `x build compiler (or rustc) --stage N` bootstrap builds stage N+1 compiler, which is clearly not what we requested. This doesn't happen when running `x build --stage N` without explicitly targeting the compiler.

The changes applied fix this issue.

r? ghost
2025-03-03 20:47:12 +01:00
Matthias Krüger
0b9ff83bbb
Rollup merge of #137863 - compiler-errors:unsafe-binder-render, r=oli-obk
Fix pretty printing of unsafe binders

We used to render `unsafe<> i32` as `i32`, and `unsafe<'a> &'a i32` as `for<'a> &'a i32`.

r? oli-obk

Review with whitespace b/c adding a new argument changes some the wrapping of some function calls.
2025-03-03 20:47:11 +01:00
Matthias Krüger
74e9ca6772
Rollup merge of #137852 - moulins:layout-nonarray-simd-deadcode, r=workingjubilee
Remove layouting dead code for non-array SIMD types.

These aren't supported anymore, and are already rejected in type checking.
2025-03-03 20:47:10 +01:00
Matthias Krüger
1b4e66e0bf
Rollup merge of #135767 - tdittr:fn_ptr_calling_conventions-in-deps, r=compiler-errors
Future incompatibility warning `unsupported_fn_ptr_calling_conventions`: Also warn in dependencies

Tracking issue: https://github.com/rust-lang/rust/issues/130260

As discussed [in the previous PR](https://github.com/rust-lang/rust/pull/128784/files#r1752533758) now the future incompatibility warning is enabled in dependencies.

The warning was added in 1.83, while this change will get into stable in 1.86, which gives crate authors three versions to fix the warning.

r? compiler-errors
2025-03-03 20:47:09 +01:00
bors
e16a049adb Auto merge of #137914 - matthiaskrgr:rollup-phaxe6f, r=matthiaskrgr
Rollup of 6 pull requests

Successful merges:

 - #137103 ({json|html}docck: catch and error on deprecated syntax)
 - #137632 (rustdoc: when merging target features, keep the highest stability)
 - #137684 (Add rustdoc support for `--emit=dep-info[=path]`)
 - #137794 (make qnx pass a test)
 - #137801 (tests: Unignore target modifier tests on all platforms)
 - #137826 (test(codegen): add looping_over_ne_bytes test for #133528)

r? `@ghost`
`@rustbot` modify labels: rollup
2025-03-03 19:34:25 +00:00
Alona Enraght-Moony
f0de899001
triagebot.toml: Don't label test/rustdoc-json as A-rustdoc-search
This happened because `test/rustdoc-js` is a prefix of `test/rustdoc-json`, and triagebot works on prefixes.

Maybe this should be fixed in triagebot, but this works now.
2025-03-03 19:28:57 +00:00
Noratrieb
dfed028e78 Always allow rustdoc-json tests to contain long lines
The rustdoc-json test syntax often requires very long lines, so the checks
for long lines aren't really useful.
2025-03-03 19:59:54 +01:00
bors
d491662340 Auto merge of #137945 - Kobzol:skip-rfl, r=marcoieni
Skip Rust for Linux in CI temporarily

Temporary fix to unblock CI.
2025-03-03 16:05:40 +00:00
Eric Huss
93b8279f4f Fix docker run-local docs 2025-03-03 07:15:34 -08:00
Jakub Beránek
530bedc1d0 Skip Rust for Linux in CI temporarily 2025-03-03 16:09:57 +01:00
Matthias Krüger
1998cf76a8
Rollup merge of #137862 - mtoner23:print-help, r=nnethercote
ensure we always print all --print options in help

Closes #137853
Refactors the PRINT_KINDS map into a public const so we always print every option for print. the list is quite long now, and idk if long term we want to keep printing all these options from --help.
2025-03-03 10:41:02 +01:00
Matthias Krüger
0b66424068
Rollup merge of #137849 - jieyouxu:undo-workaround, r=Kobzol
Revert "Remove Win SDK 10.0.26100.0 from CI"

Part of #137733.
Resolves #137733.

The remove-latest-windows-sdk workaround workaround should no longer be necessary, now that we bumped (1) cargo `cc` and (2) `rustc_{codegen_ssa,llvm}` `cc`.

This reverts commit 25617c7e69, the remove-latest-windows-sdk workaround from #137753.

try-job: i686-msvc-1
try-job: i686-msvc-2
try-job: dist-i686-msvc
2025-03-03 10:41:01 +01:00
Matthias Krüger
fd4bf82264
Rollup merge of #137741 - cuviper:const_str-raw_entry, r=Mark-Simulacrum
Stop using `hash_raw_entry` in `CodegenCx::const_str`

That unstable feature (#56167) completed fcp-close, so the compiler needs to be
migrated away to allow its removal. In this case, `cg_llvm` and `cg_gcc`
were using raw entries to optimize their `const_str_cache` lookup and
insertion. We can change that to separate `get` and (on miss) `insert`
calls, so we still have the fast path avoiding string allocation when
the cache hits.
2025-03-03 10:41:00 +01:00
Matthias Krüger
1305212786
Rollup merge of #137618 - yotamofek:pr/pre-push-hook, r=Mark-Simulacrum
Skip `tidy` in pre-push hook if the user is deleting a remote branch

It's kinda annoying when I'm trying to delete remote branches and that triggers `tidy`, so small fix to prevent that.
Hopefully this should be an acceptable amount of complexity to add to this shell script.
2025-03-03 10:41:00 +01:00
Matthias Krüger
7dd586844a
Rollup merge of #137525 - tgross35:test-float-parse-less-parallelization, r=Mark-Simulacrum
Simplify parallelization in test-float-parse

Currently, test case generators are launched in parallel and their test cases also run in parallel, all within the same pool. I originally implemented this with the assumption that there would be an advantage in parallelizing the generators themselves, but this turns out to not really have any benefit.

Simplify things by running generators in series while keeping their test cases parallelized. This makes the code easier to follow, and there is no longer a need for MPSC or multiprogress bars. Additionally, the UI output can be made cleaner.
2025-03-03 10:40:59 +01:00
Matthias Krüger
b0bf3d561f
Rollup merge of #137054 - jhpratt:phantom-variance, r=Mark-Simulacrum
Make phantom variance markers transparent
2025-03-03 10:40:59 +01:00
Matthias Krüger
f71b6ebb49
Rollup merge of #136938 - mustartt:fix-stack-protector-filecheck, r=Mark-Simulacrum
Remove `:` from `stack-protector-heuristics-effect.rs` Filecheck Pattern

With function sections, the assembly label does not necessarily end in `:`.

Remove trailing `:` to be more consistent with the rest of the existing Filecheck patterns.
```
// CHECK-LABEL: local_string_addr_taken
#[no_mangle]
pub fn local_string_addr_taken(f: fn(&String)) {
    let x = String::new();
    f(&x);
```
2025-03-03 10:40:58 +01:00
Matthias Krüger
9aff9c070a
Rollup merge of #134900 - dtolnay:unoprange, r=compiler-errors,davidtwco
Fix parsing of ranges after unary operators

Fixes https://github.com/rust-lang/rust/issues/134899.

This PR aligns the parsing for unary `!` and `-` and `*` with how unary `&` is already parsed [here](5c0a6e68cf/compiler/rustc_parse/src/parser/expr.rs (L848-L854)).
2025-03-03 10:40:57 +01:00
Matthias Krüger
2344a34241
Rollup merge of #132388 - frank-king:feature/where-cfg, r=petrochenkov
Implement `#[cfg]` in `where` clauses

This PR implements #115590, which supports `#[cfg]` attributes in `where` clauses.

The biggest change is, that it adds `AttrsVec` and  `NodeId` to the `ast::WherePredicate` and `HirId` to the `hir::WherePredicate`.
2025-03-03 10:40:56 +01:00
Zalathar
cfa27fbeef Tidy imports in rustc_data_structures::sync 2025-03-03 20:21:12 +11:00
Zalathar
32c5449d45 Remove some unnecessary aliases from rustc_data_structures::sync
With the removal of `cfg(parallel_compiler)`, these are always shared
references and `std::sync::OnceLock`.
2025-03-03 20:20:24 +11:00
Speedy_Lex
7c62a4766f fix order on shl impl
this doesn't fix any bugs, it just looks more consistent with the other impl's
2025-03-03 09:51:51 +01:00
Tamme Dittrich
6657aa99dd Bless UI tests 2025-03-03 09:03:04 +01:00
Tamme Dittrich
310f837fd5 Change variadic-ffi-2 to use a platform independant ABI
Otherwise this test will include a future incompatibility warning
on some targets but not others.
2025-03-03 08:52:07 +01:00
Tamme Dittrich
2bf5cc93e6 Bless UI tests 2025-03-03 08:52:07 +01:00
Tamme Dittrich
9b78d48c11 After introducing the warning in 1.83, now also warn in deps
This was left to only warn in the current crate to give users
a chance to update their code. Now for 1.86 we also warn users
depending on those crates.
2025-03-03 08:52:06 +01:00
Zalathar
5afd12239a Remove leading underscores from parameter names in Sharded
With the removal of `cfg(parallel_compiler)`, these parameters are never
considered unused.
2025-03-03 18:07:54 +11:00
Laurențiu Nicola
015e81d08f
Merge pull request #19269 from lnicola/sync-from-rust
minor: sync from downstream
2025-03-03 07:00:48 +00:00
Laurențiu Nicola
24c480e350 Bump rustc crates 2025-03-03 08:43:57 +02:00
Laurențiu Nicola
dd3a5f9a64 Merge from rust-lang/rust 2025-03-03 08:38:46 +02:00
Laurențiu Nicola
969868ba30 Preparing for merge from rust-lang/rust 2025-03-03 08:38:14 +02:00
Matthias Krüger
15e97bd45e
Rollup merge of #137826 - karolzwolak:looping_over_ne_bytes_133528, r=DianQK
test(codegen): add looping_over_ne_bytes test for #133528

Adds test for #133528.
I renamed the function to `looping_over_ne_bytes` to better reflect that it is doing.
I also set the min llvm version to 20 as this was presumably a llvm bug that was fixed in version 20.
I didn't tie the test to any specific architecture, as we are testing llvm output.
2025-03-03 06:41:36 +01:00
Matthias Krüger
d818c1da17
Rollup merge of #137801 - petrochenkov:tarmod, r=compiler-errors
tests: Unignore target modifier tests on all platforms

These tests can be `check-pass` and do not need dynamic libraries.
Also remove other unnecessary stuff from them.

Follow up to https://github.com/rust-lang/rust/pull/133138.
2025-03-03 06:41:36 +01:00
Matthias Krüger
65c34bb477
Rollup merge of #137794 - tshepang:make-qnx-pass, r=pietroalbini
make qnx pass a test

[tests/ui/attributes/used_with_archive.rs](b202430084/tests/ui/attributes/used_with_archive.rs) fails when executed for QNX targets, because its stdout does not match [this content](b202430084/tests/ui/attributes/used_with_archive.run.stdout)
2025-03-03 06:41:35 +01:00
Matthias Krüger
f726e5cb84
Rollup merge of #137684 - GuillaumeGomez:rustdoc-dep-info, r=notriddle
Add rustdoc support for `--emit=dep-info[=path]`

Fixes #91982.

This PR adds the `--emit=dep-info` command line flag support. It will be helpful for `cargo` development.

cc ````@epage````

r? ````@notriddle````
2025-03-03 06:41:34 +01:00
Matthias Krüger
962e492847
Rollup merge of #137632 - RalfJung:rustdoc-target-features, r=workingjubilee
rustdoc: when merging target features, keep the highest stability

This addresses https://github.com/rust-lang/rust/issues/137366. (Not closing since we might consider a backport.)

rustdoc wants to pretend that it runs for all targets at once and has all target features, so `tcx.rust_target_features()` will actually be all the target features. For target features that exist on multiple targets, the stability info for one of the targets will be picked (first or last in the list, I guess). All the code consuming that query has to be aware that the data is basically nonsense when running in rustdoc, but the logic checking for unstable or forbidden `#[target_feature]` attributes was not aware of that.

This PR makes the  `tcx.rust_target_features()` info in rustdoc slightly less nonsensical (and decidedly less random) by having the "most stable" target feature take precedent. That deals with #137366 (a conflict between a stable and a "forbidden" target feature of the same name for different targets), and also deals with the situation (that we did not seem to have yet) of a conflict between a stable and an unstable target feature of the same name. Note that if there are two unstable target features of the same name, rustdoc might still require the "wrong" nightly feature to be enabled -- but this can only possibly affect unstable code so I guess we can wait until that actually happens, and then someone will have to rewrite this entire thing to be less hacky.
2025-03-03 06:41:34 +01:00
Matthias Krüger
0447829803
Rollup merge of #137103 - yotamofek:pr/jsonhtmldocck-deprecated-syntax, r=aDotInTheVoid
{json|html}docck: catch and error on deprecated syntax

https://github.com/rust-lang/rust/pull/137099#pullrequestreview-2619498733
2025-03-03 06:41:33 +01:00
bors
81d8edc200 Auto merge of #137900 - matthiaskrgr:rollup-rvan5ao, r=matthiaskrgr
Rollup of 10 pull requests

Successful merges:

 - #137375 (Minor internal comments fix for `BufRead::read_line`)
 - #137641 (More precisely document `Global::deallocate()`'s safety.)
 - #137755 (doc: update Wasmtime flags)
 - #137851 (improve `simd_select` error message when used with invalid mask type)
 - #137860 (rustc_target: Add msync target feature and enable it on powerpcspe targets)
 - #137871 (fix `RangeBounds::is_empty` documentation)
 - #137873 (Disable `f16` on Aarch64 without `neon`)
 - #137876 (Adjust triagebot.toml entries for `rustc_mir_build/src/builder/`)
 - #137883 (edit mailmap)
 - #137886 (`name()` and `trimmed_name()` for `stable_mir::crate_def::DefId`)

r? `@ghost`
`@rustbot` modify labels: rollup
2025-03-03 03:41:03 +00:00
Chayim Refael Friedman
c6a7251c22
Merge pull request #19226 from Shourya742/2025-02-25-fix-completion-ref-matching
completion-ref-matching
2025-03-03 02:37:00 +00:00