1
Fork 0
Commit graph

283180 commits

Author SHA1 Message Date
binarycat
60c5855346 ParserQueryElement.typeFilter MAY be a string, OR number.
ideally we would encode that it is a string before
convertTypeFilterOnElem is called, and a number after,
but i'm not sure that's possible without significant refactoring.
2025-03-04 00:44:46 -06:00
binarycat
2f9ea8a55a rustdoc search: give buildTypeMapIndex a conditional return type
we encode "if the argument is a non-empty string,
this will never return null" into the type signature.
2025-03-04 00:27:27 -06:00
binarycat
a8c0b3bfff rustdoc search: increase strictness of typechecking 2025-03-03 23:36:12 -06:00
Scott McMurray
fe6cf34147 Also simplify Preorder's size_hint 2025-03-03 21:07:55 -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
Zalathar
12cc2b969d Remove unused PpMode::needs_hir 2025-03-04 13:23:40 +11:00
Michael Goulet
3e5fddc95e Allow struct field default values to reference struct's generics 2025-03-04 01:00:55 +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
Kirill Podoprigora
a89cddb2be Add `dyn` keyword 2025-03-03 22:58:03 +02:00
Jakub Beránek
4f4cbff170 Re-enable Rust for Linux CI job 2025-03-03 20:55:48 +01:00
Jakub Beránek
e3117e6e18 Do not use rustup to build Rust for Linux 2025-03-03 20:55:27 +01:00
Jieyou Xu
53ee6968a3 Update MSVC INSTALL.md instructions to recommend VS 2022 + recent Windows 10/11 SDK 2025-03-04 03:47:45 +08: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
Scott McMurray
e403654c8b Simplify <Postorder as Iterator>::size_hint
The current version is wrong (cc 137919); let's see if we can get away with a loose but trivially-correct one.
2025-03-02 23:47:24 -08: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