about summary refs log tree commit diff
AgeCommit message (Collapse)AuthorLines
2025-09-01Remove `Compiler::with_stage`Jakub Beránek-6/+1
2025-09-01Rename `compiler` to `test_compiler`Jakub Beránek-47/+54
2025-09-01Add some compiletest suites snapshot testsJakub Beránek-35/+133
2025-09-01Remove outdated commentJakub Beránek-3/+0
2025-09-01Auto merge of #145663 - Kobzol:bootstrap-test, r=jieyouxubors-384/+760
Enforce in bootstrap that test must have stage at least 1 (except for compiletest) This PR cleans up a bunch of test steps and adds metadata to them. I didn't yet touch the most complicated step (`CompileTest`), I'm leaving that for another PR. Testing anything on stage 0 is only possible for compiletest and with `build.allow-compiletest-stage0`. Testing anything else on stage 0 will either produce a nice error or crash with a stage being subtracted below zero. r? `@jieyouxu` try-job: dist-x86_64-linux try-job: aarch64-gnu try-job: arm-android try-job: `x86_64-gnu-llvm-20*` try-job: `x86_64-msvc-*` try-job: aarch64-apple try-job: test-various
2025-08-31Auto merge of #146038 - notriddle:polarity, r=GuillaumeGomezbors-72/+267
rustdoc-search: split function inverted index by input/output Fixes rust-lang/rust#146015 With a patch applied to count the number of unifications, and running the query `Option<T>, (T -> U) -> Option<U>` before: performed unifyFunctionType on 17484 functions after: performed unifyFunctionType on 3055 functions preview: https://notriddle.com/rustdoc-html-demo-12/polarity/doc/std/index.html https://notriddle.com/rustdoc-html-demo-12/polarity/compiler-doc/rustc_hir/index.html
2025-08-31Auto merge of #146053 - joboet:split-paths-regression, r=Mark-Simulacrumbors-5/+26
std: fix `SplitPaths` regression Fixes rust-lang/rust#146045 by defining the TAIT more precisely, ensuring that `'a` does not need to be live on drop.
2025-08-31Auto merge of #146052 - matthiaskrgr:rollup-cfxx9m6, r=matthiaskrgrbors-55/+123
Rollup of 4 pull requests Successful merges: - rust-lang/rust#144443 (Make target pointer width in target json an integer) - rust-lang/rust#145174 (Ensure consistent drop for panicking drop in hint::select_unpredictable) - rust-lang/rust#145592 (Fix format string grammar in docs and improve alignment error message for rust-lang/rust#144023) - rust-lang/rust#145931 (Clarify that align_offset overaligns) r? `@ghost` `@rustbot` modify labels: rollup
2025-08-31std: fix `SplitPaths` regressionjoboet-5/+26
2025-08-31Rollup merge of #145931 - gonzalobg:patch-1, r=nagisaMatthias Krüger-3/+2
Clarify that align_offset overaligns The current documentation is not clear whether adding `a` to a pointer overaligns (align up) or underaligns (align down). It should say this explicitly. cc `@nagisa`
2025-08-31Rollup merge of #145592 - nilotpal-n7:fix-format-alignment, r=lcnrMatthias Krüger-9/+19
Fix format string grammar in docs and improve alignment error message for #144023 This PR improves error messages and documentation for format strings involving alignment and formatting traits. Highlights: - Clearer error messages for invalid alignment specifiers (e.g., `{0:#X>18}`), showing the expected `<`, `^`, or `>` and a working example: println!("{0:>#18X}", value); - Updated UI test `format-alignment-hash.rs` to reflect the improved error output. - Documentation clarification: ensures examples correctly show how width, alignment, and traits like `x`, `X`, `#` combine. Motivation: Previously, using `#` with alignment and width produced confusing errors. This PR guides users on the correct syntax and provides actionable examples. Testing: - Built the compiler (`./x build`) - Blessed and ran UI tests (`./x. test src/test/ui/fmt/format-alignment-hash.rs --bless`) - Verified full test suite passes (`./x test`) Issue: rust-lang/rust#144023
2025-08-31Rollup merge of #145174 - 197g:issue-145148-select-unpredictable-drop, r=joboetMatthias Krüger-2/+71
Ensure consistent drop for panicking drop in hint::select_unpredictable There are a few alternatives to the implementation. The principal problem is that the selected value must be owned (in the sense of having a drop flag of sorts) when the unselected value is dropped, such that panic unwind goes through the drop of both. This ownership must then be passed on in return when the drop went smoothly. The basic way of achieving this is by extracting the selected value first, at the cost of relying on the optimizer a little more for detecting the copy as constructing the return value despite having a place in the body. Unfortunately, that causes LLVM to discard the !unpredictable annotation (for some reason that is beyond my comprehension of LLVM). <details> <summary>Extract from the build log showing an unannotated select being used</summary> ``` 2025-08-09T16:51:06.8790764Z 39: define noundef i64 `@test_int2(i1` noundef zeroext %p, i64 noundef %a, i64 noundef %b) unnamed_addr #0 personality ptr `@rust_eh_personality` { 2025-08-09T16:51:06.8791368Z check:47'0 X~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ error: no match found 2025-08-09T16:51:06.8791700Z 40: start: 2025-08-09T16:51:06.8791858Z check:47'0 ~~~~~~~ 2025-08-09T16:51:06.8792043Z 41: %ret.i = select i1 %p, i64 %a, i64 %b 2025-08-09T16:51:06.8792293Z check:47'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2025-08-09T16:51:06.8792686Z check:47'1 ? possible intended match 2025-08-09T16:51:06.8792946Z 42: ret i64 %ret.i 2025-08-09T16:51:06.8793127Z check:47'0 ~~~~~~~~~~~~~~~~ ``` </details> So instead, this PR includes a guard to drop the selected `MaybeUnit<T>` which is active only for the section where the unselected value is dropped. That leaves the code for selecting the result intact leading to the expected ir. That complicates the 'unselection' process a little bit since we require _both_ values as a result of that intrinsic call. Since the arguments alias, this portion as well as the drop guard uses raw pointers. Closes: rust-lang/rust#145148 Prior: rust-lang/rust#139977
2025-08-31Rollup merge of #144443 - WaffleLapkin:integer-target-pointer-width, r=NoratriebMatthias Krüger-41/+31
Make target pointer width in target json an integer r? Noratrieb cc `@RalfJung` (https://github.com/rust-lang/rust/pull/142352/files#r2230380120) try-job: x86_64-rust-for-linux
2025-08-31Auto merge of #146039 - Mark-Simulacrum:fix-bolt-path, r=Kobzolbors-5/+15
Use absolute path to llvm-bolt, merge-fdata rather than PATH This unconditionally uses the provided LLVM toolchain's BOLT. I'm not sure that makes sense, but since we don't build BOLT as part of Rust's build of LLVM today, it's probably the right option for now. This avoids breaking the build on not being able to find the llvm-bolt executable.
2025-08-30rustdoc-search: improve concurrency at type searchMichael Howell-9/+15
2025-08-31Auto merge of #145582 - estebank:issue-107806, r=chenyukangbors-0/+160
Detect missing `if let` or `let-else` During `let` binding parse error and encountering a block, detect if there is a likely missing `if` or `else`: ``` error: expected one of `.`, `;`, `?`, `else`, or an operator, found `{` --> $DIR/missing-if-let-or-let-else.rs:14:25 | LL | let Some(x) = foo() { | ^ expected one of `.`, `;`, `?`, `else`, or an operator | help: you might have meant to use `if let` | LL | if let Some(x) = foo() { | ++ help: alternatively, you might have meant to use `let else` | LL | let Some(x) = foo() else { | ++++ ``` Fix rust-lang/rust#107806.
2025-08-30Auto merge of #146043 - tgross35:rollup-hdumq5v, r=tgross35bors-32/+117
Rollup of 4 pull requests Successful merges: - rust-lang/rust#144964 (std: clarify `OpenOptions` error for create without write access) - rust-lang/rust#146030 (Fix `sys::process::windows::tests::test_thread_handle` spurious failure) - rust-lang/rust#146035 (Update `browser-ui-test` version to `0.21.3`) - rust-lang/rust#146036 (Use move_file for rename in tracing) r? `@ghost` `@rustbot` modify labels: rollup
2025-08-30Rollup merge of #146036 - Mark-Simulacrum:rust-1, r=KobzolTrevor Gross-1/+5
Use move_file for rename in tracing This avoids panicking when the source and destination are on different filesystems.
2025-08-30Rollup merge of #146035 - GuillaumeGomez:update-browser-ui-test, ↵Trevor Gross-3/+3
r=GuillaumeGomez Update `browser-ui-test` version to `0.21.3` I cannot test it locally because of this bug: ``` error: couldn't generate documentation: failed to read column from disk: data consumer error: missing field `unknown number` at line 1 column 8 | = note: failed to create or modify "build/x86_64-unknown-linux-gnu/test/rustdoc-gui/doc/search.index/entry/": failed to read column from disk: data consumer error: missing field `unknown number` at line 1 column 8 ``` So I'll iterate through CI checks I guess. r? ghost
2025-08-30Rollup merge of #146030 - ChrisDenton:wait-timeout, r=tgross35Trevor Gross-6/+18
Fix `sys::process::windows::tests::test_thread_handle` spurious failure Instead of sleeping, wait for the process to finish so that we can be sure it's done. We use a timeout because otherwise this test can be stuck indefinitely if it fails (unfortunately std doesn't currently have a way to wait with a timeout so a manual OS API call is necessary). I also changed the test to run `whoami` and pipe the output to null so that it doesn't clutter up the test output. Fixes rust-lang/rust#146024
2025-08-30Rollup merge of #144964 - 0xdeafbeef:fix-open-options, r=ibraheemdevTrevor Gross-22/+91
std: clarify `OpenOptions` error for create without write access Fixes rust-lang/rust#140621
2025-08-30Use absolute path to llvm-bolt, merge-fdata rather than PATHMark Rousskov-5/+15
This unconditionally uses the provided LLVM toolchain's BOLT. I'm not sure that makes sense, but since we don't build BOLT as part of Rust's build of LLVM today, it's probably the right option for now. This avoids breaking the build on not being able to find the llvm-bolt executable.
2025-08-30rustdoc-search: split function inverted index by input/outputMichael Howell-67/+256
With a patch applied to count the number of unifications, and running the query `Option<T>, (T -> U) -> Option<U>` before: performed unifyFunctionType on 17484 functions after: performed unifyFunctionType on 3055 functions
2025-08-30review comment: move `Visitor`Esteban Küber-27/+29
2025-08-30Fix spurious test timeoutChris Denton-6/+18
2025-08-30Auto merge of #146029 - JonathanBrouwer:incorrect-fixme, r=jdonszelmannbors-1/+1
Remove incorrect fixme on deprecation target This does actually working suprisingly enough, applying deprecation to all methods in the impl block r? `@jdonszelmann`
2025-08-30Use move_file for rename in tracingMark Rousskov-1/+5
This avoids panicking when the source and destinations are on different filesystems.
2025-08-30Update `browser-ui-test` version to `0.21.3`Guillaume Gomez-3/+3
2025-08-30Auto merge of #145479 - Kmeakin:km/hardcode-char-is-control, r=joboetbors-28/+5
Hard-code `char::is_control` Split off from https://github.com/rust-lang/rust/pull/145219 According to https://www.unicode.org/policies/stability_policy.html#Property_Value, the set of codepoints in `Cc` will never change. So we can hard-code the patterns to match against instead of using a table. This doesn't change the generated assembly, since the lookup table is small enough that[ LLVM is able to inline the whole search](https://godbolt.org/z/bG8dM37YG). But this does reduce the chance of regressions if LLVM's heuristics change in the future, and means less generated Rust code checked in to `unicode-data.rs`.
2025-08-30Do not run `lint-docs` tests in stage 1 `x test` by defaultJakub Beránek-14/+10
2025-08-30Fix stage 1 compiler testsJakub Beránek-19/+97
2025-08-30Add test stage 2 snapshot testsJakub Beránek-10/+97
2025-08-30Fix tests and doclinkJakub Beránek-10/+10
2025-08-30Fake nodejs in snapshot testJakub Beránek-0/+2
2025-08-30Fix doclinkJakub Beránek-1/+1
2025-08-30Skip bootstrap tests on CIJakub Beránek-1/+5
2025-08-30Add change tracker entryJakub Beránek-0/+5
2025-08-30Do not run tests on CI in stage 0Jakub Beránek-1/+1
2025-08-30Fix spacing when testing individual cratesJakub Beránek-6/+11
2025-08-30Fix staging for compiler/std crate testsJakub Beránek-56/+106
2025-08-30Move the `test!` macro closer to its usagesJakub Beránek-70/+70
2025-08-30Add metadata to a bunch of steps, rename variables and add commentsJakub Beránek-28/+102
2025-08-30Small refactoring around `RemoteCopyLibs`Jakub Beránek-10/+14
2025-08-30Remove stage0 checkingJakub Beránek-16/+2
2025-08-30Refactor `test::LintDocs`Jakub Beránek-7/+31
2025-08-30Remove `compiler_for` from `test::CodegenCranelift`Jakub Beránek-49/+35
2025-08-30Remove `compiler_for` from `test::CodegenGCC`Jakub Beránek-51/+31
2025-08-30Fix staging of `TestFloatParse`Jakub Beránek-74/+61
The tool wasn't useful for anything, it was only built as a part of the test, but we can just use `cargo test` and `cargo run` in the test, no need to (pre-)build the tool itself.
2025-08-30Add snapshot test for `x test`Jakub Beránek-1/+71
2025-08-30Forbid running tests on stage 0 unless `build.compiletest-allow-stage0` is ↵Jakub Beránek-1/+7
enabled