Commit Graph

283414 Commits

Author SHA1 Message Date
Maja Kądziołka
a3d63fb0d4
InhabitedPredicate: avoid using a wildcard branch
This is error-prone. Explicitly write down which cases don't need
anything substituted. Turn the `OpaqueType` case, which currently
seems to be unreachable, into a `bug!`.
2025-03-04 13:33:16 +01:00
Maja Kądziołka
da3e73654f
Clarify why InhabitedPredicate::instantiate_opt exists
At first glance, the extra casework seems pointless and needlessly
error-prone. Clarify that there is a reason for it being there.
2025-03-04 13:33:16 +01:00
Askar Safin
c6c4ea40dc Revert "compiler/rustc_data_structures/src/sync/worker_local.rs: delete "unsafe impl Sync""
This reverts commit 02406903b0.
2025-03-04 15:32:55 +03:00
Jakub Beránek
7b53ac7ee6 Record bootstrap step durations into GitHub summary in citool 2025-03-04 12:31:53 +01:00
Jakub Beránek
ead58ea6f8 Move BuildStep and metric logging into build_helper 2025-03-04 12:30:41 +01:00
Jakub Beránek
2e5ab4e6a0 Store bootstrap command-line into metrics 2025-03-04 12:30:41 +01:00
Jakub Beránek
6463590f0c Postprocess test suite metrics into GitHub summary 2025-03-04 12:30:41 +01:00
Tomasz Miąsko
84dd2a7776 Remove obsolete comment from DeduceReadOnly
The situation described in the comment does arise in practice now and
described panic is long gone.
2025-03-04 12:26:01 +01:00
Yotam Ofek
6e86aa17ec Adapt librustdoc to 2024 edition lifetieme capture rules
Get rid of the `Captures` hack
2025-03-04 12:35:23 +02:00
Yotam Ofek
00523bf7c3 librustdoc: 2024 edition! 🎊 2025-03-04 12:35:18 +02:00
Trevor Gross
2816f03022 Add avr-none to SUMMARY.md and platform-support.md
This was missed this in the implementation PR, so update the links here.
2025-03-04 09:56:25 +00:00
MarcoIeni
69c46515ed
ci: use ubuntu 24 on arm large runner 2025-03-04 10:01:00 +01:00
fuyangpengqi
4febd273e5 Fix some typos
Signed-off-by: fuyangpengqi <995764973@qq.com>
2025-03-04 16:05:32 +08:00
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
Michael Goulet
09e584671b Also note struct access, and fix macro expansion from foreign crates 2025-03-04 00:04:01 +00:00
Michael Goulet
06072468fe Fix associated type errors too 2025-03-03 23:53:42 +00:00
Michael Goulet
e4dfca8ac2 Point out macro expansion ident in resolver errors too 2025-03-03 23:53:42 +00:00
Michael Goulet
ab31129956 Point of macro expansion from call expr if it involves macro var 2025-03-03 23:53:42 +00:00
Michael Goulet
d33946c3ab Inline FnOnce once again 2025-03-03 23:30:18 +00:00
Michael Goulet
e081b7b77e Better reasons for inline failure 2025-03-03 23:22:37 +00:00
Michael Goulet
0baee2432a Don't typeck during WF, instead check outside of WF in check_crate 2025-03-03 23:09:42 +00:00
Michael Goulet
9d3d5a7fbb Check signature WF when lowering MIR body 2025-03-03 23:09:42 +00:00
Michael Goulet
c566318a78 Tweak error code for sized checks of const/static 2025-03-03 23:09:42 +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
Jane Losare-Lusby
ddd04d03d1 Add timestamp to unstable feature usage metrics 2025-03-03 13:24:30 -08:00
Kirill Podoprigora
a89cddb2be Add `dyn` keyword 2025-03-03 22:58:03 +02:00
Esteban Küber
0c4eaa5c98 Use default field values for ErrorOutputType
Remove manual `Default` impl from `config::ErrorOutputType`.
2025-03-03 20:18:56 +00:00
Esteban Küber
aae7a3c4c2 Use default field values for config::NextSolverConfig
Use default field values to avoid manual `Default` impl.
2025-03-03 20:05:42 +00:00
Esteban Küber
2a4204bf6c Use default field values in markdown::parse::Context 2025-03-03 20:04:20 +00: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