about summary refs log tree commit diff
path: root/src
AgeCommit message (Collapse)AuthorLines
2025-03-02Merge pull request #19259 from Veykril/push-skmvrmtorqsoLukas Wirth-45/+162
Add flip or-pattern assist
2025-03-02Merge pull request #19253 from ShoyuVanilla/migrate-convert-bool-thenLukas Wirth-60/+174
internal: Migrate `convert_bool_then` to `SyntaxEditor`
2025-03-02Add flip or-pattern assistLukas Wirth-45/+162
2025-03-02Simplify parallelization in test-float-parseTrevor Gross-226/+174
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-02Merge from rustcThe Miri Cronjob Bot-15668/+35055
2025-03-02Preparing for merge from rustcThe Miri Cronjob Bot-1/+1
2025-03-02Auto merge of #137855 - matthiaskrgr:rollup-uh7f3fi, r=matthiaskrgrbors-3/+3
Rollup of 10 pull requests Successful merges: - #137804 (rename BackendRepr::Vector → SimdVector) - #137807 (Fully qualify `Result` in generated doctest code) - #137809 (Use correct error message casing for `io::const_error`s) - #137818 (tests: adapt for LLVM 21 changes) - #137822 (Update query normalizer docs to not position it as the greatest pioneer in the space of normalization) - #137824 (Tweak invalid RTN errors) - #137828 (Fix inaccurate `std::intrinsics::simd` documentation) - #137830 (Fix link failure on AVR (incompatible ISA error)) - #137837 (Update `const_conditions` and `explicit_implied_const_bounds` docs) - #137840 (triagebot: only ping me for constck) r? `@ghost` `@rustbot` modify labels: rollup
2025-03-01Auto merge of #137752 - flip1995:clippy-subtree-update, r=Manishearthbors-15391/+34666
Clippy subtree update ? `@Manishearth` Cargo.lock change because of Clippy version bump and rustc_tool_utils new release. Fixes #137640 Would be nice, if we could this merged before nightly is being build, so that this ICE is fixed tomorrow.
2025-03-02rustc-dev-guide: remove mentions of legacy `Makefile` run-make infra许杰友 Jieyou Xu (Joe)-60/+2
And remove outdated requirements to run `run-make` tests on Windows.
2025-03-02tidy: remove legacy `Makefile` checks许杰友 Jieyou Xu (Joe)-107/+0
2025-03-02run-make-support: remove outdated comments许杰友 Jieyou Xu (Joe)-108/+0
2025-03-02compiletest: remove legacy `Makefile`-based `run-make` support许杰友 Jieyou Xu (Joe)-214/+18
2025-03-01Compile run-make recipes using the stage0 compilerJakub Beránek-119/+74
2025-03-02Add minimal platform support documentation for powerpc-unknown-linux-gnuspeTaiki Endo-3/+26
2025-03-01Merge pull request #19251 from Veykril/push-tkmpqtzxynxkLukas Wirth-87/+50
Remove syntax editing from parenthesis computation
2025-03-01Remove syntax editing from parenthesis computationLukas Wirth-87/+50
2025-03-01Fix `test_keyword_highlighting` testLukas Wirth-38/+107
2025-03-01Cleanup string handling in syntax highlightingLukas Wirth-58/+27
2025-03-01More precise macro modifiers for syntax highlightingLukas Wirth-231/+231
2025-03-01Cleanup highlighting macro-def handlingLukas Wirth-340/+197
2025-03-01Rollup merge of #137807 - GuillaumeGomez:doctest-qualify-result, r=notriddleMatthias Krüger-2/+2
Fully qualify `Result` in generated doctest code As discussed in https://lore.kernel.org/rust-for-linux/20250228132553.880126-1-guillaume1.gomez@gmail.com/T/#u, it would require less code for RfL to be able to reach the same result (pun unintended). cc ``@ojeda`` r? ``@notriddle``
2025-03-01Rollup merge of #137804 - RalfJung:backend-repr-simd-vector, r=workingjubileeMatthias Krüger-1/+1
rename BackendRepr::Vector → SimdVector For many Rustaceans, "vector" does not imply "SIMD", so let's be more clear in this type that is used pervasively in the compiler. r? `@workingjubilee`
2025-03-01Implment `#[cfg]` and `#[cfg_attr]` in `where` clausesFrank King-20/+165
2025-03-01Rollup merge of #137769 - compiler-errors:empty-unsafe-fmt, r=ytmimiMatthias Krüger-1/+10
Do not yeet `unsafe<>` from type when formatting unsafe binder Unsafe binders are types like `unsafe<'a, 'b> Ty<'a, 'b>`. However, users can also specify unsafe binder types with no bound vars, like `unsafe<> Ty`. When I added nightly formatting for unsafe binders, I didn't consider this, so on nightly we are stripping the `unsafe<>` part, which gives us back `Ty` which is a different type! This PR fixes that. r? ``@ytmimi``
2025-03-01Rollup merge of #137719 - GuillaumeGomez:missing-doc, r=notriddleMatthias Krüger-1/+16
Add missing case explanation for doc inlined re-export of doc hidden item This case was not covered in the rustdoc book as uncovered in #137342. r? ``@notriddle``
2025-03-01Rollup merge of #136503 - estebank:const-panic, r=RalfJungMatthias Krüger-1/+1
Tweak output of const panic diagnostic ### Shorten span of panic failures in const context Previously, we included a redundant prefix on the panic message and a postfix of the location of the panic. The prefix didn't carry any additional information beyond "something failed", and the location of the panic is redundant with the diagnostic's span, which gets printed out even if its code is not shown. ``` error[E0080]: evaluation of constant value failed --> $DIR/assert-type-intrinsics.rs:11:9 | LL | MaybeUninit::<!>::uninit().assume_init(); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ panic: aborted execution: attempted to instantiate uninhabited type `!` ``` ``` error[E0080]: evaluation of `Fail::<i32>::C` failed --> $DIR/collect-in-dead-closure.rs:9:19 | LL | const C: () = panic!(); | ^^^^^^^^ explicit panic | = note: this error originates in the macro `$crate::panic::panic_2015` which comes from the expansion of the macro `panic` (in Nightly builds, run with -Z macro-backtrace for more info) ``` ``` error[E0080]: evaluation of constant value failed --> $DIR/uninhabited.rs:87:9 | LL | assert!(false); | ^^^^^^^^^^^^^^ assertion failed: false | = note: this error originates in the macro `assert` (in Nightly builds, run with -Z macro-backtrace for more info) ``` ### Remove duplicated span from const eval frame list When the primary span for a const error is the same as the first frame in the const error report, skip it. ``` error[E0080]: evaluation of constant value failed --> $DIR/issue-88434-removal-index-should-be-less.rs:3:24 | LL | const _CONST: &[u8] = &f(&[], |_| {}); | ^^^^^^^^^^^^^^ explicit panic | note: inside `f::<{closure@$DIR/issue-88434-removal-index-should-be-less.rs:3:31: 3:34}>` --> $DIR/issue-88434-removal-index-should-be-less.rs:10:5 | LL | panic!() | ^^^^^^^^ the failure occurred here = note: this error originates in the macro `$crate::panic::panic_2015` which comes from the expansion of the macro `panic` (in Nightly builds, run with -Z macro-backtrace for more info) ``` instead of ``` error[E0080]: evaluation of constant value failed --> $DIR/issue-88434-removal-index-should-be-less.rs:10:5 | LL | panic!() | ^^^^^^^^ explicit panic | note: inside `f::<{closure@$DIR/issue-88434-removal-index-should-be-less.rs:3:31: 3:34}>` --> $DIR/issue-88434-removal-index-should-be-less.rs:10:5 | LL | panic!() | ^^^^^^^^ note: inside `_CONST` --> $DIR/issue-88434-removal-index-should-be-less.rs:3:24 | LL | const _CONST: &[u8] = &f(&[], |_| {}); | ^^^^^^^^^^^^^^ = note: this error originates in the macro `$crate::panic::panic_2015` which comes from the expansion of the macro `panic` (in Nightly builds, run with -Z macro-backtrace for more info) note: erroneous constant encountered --> $DIR/issue-88434-removal-index-should-be-less.rs:3:23 | LL | const _CONST: &[u8] = &f(&[], |_| {}); | ^^^^^^^^^^^^^^^ ``` r? ``@oli-obk``
2025-03-01htmldocck: catch and error on deprecated syntaxYotam Ofek-0/+14
2025-03-01jsondocck: catch and error on deprecated syntaxYotam Ofek-0/+18
2025-03-01jsondocck: minor cleanupsYotam Ofek-15/+10
- replace `OnceLock` with `LazyLock` - use `let..else` where applicable
2025-03-01Rollup merge of #137718 - Kobzol:sccache-stats, r=marcoieniMatthias Krüger-1/+1
Use original command for showing sccache stats I used the newer advanced command after bumping Linux sccache to 0.9. However, Windows and macOS still use older sccache, so the command didn't work for them (the error was masked on CI though). It sucks that we don't see the Windows/macOS sccache stats, so until we update both of them, just use the older flag with slightly less information.
2025-03-01Migrate `convert_bool_then` to `SyntaxEditor`Shoyu Vanilla-60/+174
Update assist docs
2025-03-01Auto merge of #137796 - jieyouxu:rollup-qt9yr1g, r=jieyouxubors-14/+32
Rollup of 10 pull requests Successful merges: - #134943 (Add FileCheck annotations to mir-opt/issues) - #137017 (Don't error when adding a staticlib with bitcode files compiled by newer LLVM) - #137197 (Update some comparison codegen tests now that they pass in LLVM20) - #137540 (Fix (more) test directives that were accidentally ignored) - #137551 (import `simd_` intrinsics) - #137599 (tests: use minicore more) - #137673 (Fix Windows `Command` search path bug) - #137676 (linker: Fix escaping style for response files on Windows) - #137693 (Re-enable `--generate-link-to-defintion` for tools internal rustdoc) - #137770 (Fix sized constraint for unsafe binder) r? `@ghost` `@rustbot` modify labels: rollup
2025-02-28Fix link to ty::Ty in clippy_utilsPhilipp Krones-1/+1
2025-02-28Clippy: skip check_host_compiler check in rustc testsuitePhilipp Krones-0/+5
This test only makes sense to run in the Clippy repo In the Rust repo the name of the host_compiler is dev, not nightly
2025-02-28Merge commit '9f9a822509e5ad3e560cbbe830d1013f936fca28' into ↵Philipp Krones-15391/+34661
clippy-subtree-update
2025-02-28Auto merge of #137791 - weihanglo:update-cargo, r=weihanglobors-0/+0
Update cargo 11 commits in 1d1d646c06a84c1aa53967b394b7f1218f85db82..2622e844bc1e2e6123e54e94e4706f7b6195ce3d 2025-02-21 21:38:53 +0000 to 2025-02-28 12:33:57 +0000 - Bump `cc` to 1.2.16 to fix `x86` windows jobs in rust-lang/rust CI (rust-lang/cargo#15245) - refactor(tree): Abstract the concept of a NodeId (rust-lang/cargo#15237) - feat: implement RFC 3553 to add SBOM support (rust-lang/cargo#13709) - refactor(tree): Abstract the concept of an edge (rust-lang/cargo#15233) - chore: bump openssl to v3 (rust-lang/cargo#15232) - fix(package): Register workspace member renames in overlay (rust-lang/cargo#15228) - Implemented `build.build-dir` config option (rust-lang/cargo#15104) - feat: add completions for `--manifest-path` (rust-lang/cargo#15225) - chore: semver-check build-rs against beta channel (rust-lang/cargo#15223) - chore: depend on openssl-sys to correctly pin its version (rust-lang/cargo#15224) - chore: dont check cargo-util semver until 1.86 is released (rust-lang/cargo#15222)
2025-02-28Shorten span of panic failures in const contextEsteban Küber-1/+1
Previously, we included a redundant prefix on the panic message and a postfix of the location of the panic. The prefix didn't carry any additional information beyond "something failed", and the location of the panic is redundant with the diagnostic's span, which gets printed out even if its code is not shown. ``` error[E0080]: evaluation of constant value failed --> $DIR/assert-type-intrinsics.rs:11:9 | LL | MaybeUninit::<!>::uninit().assume_init(); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ evaluation panicked: aborted execution: attempted to instantiate uninhabited type `!` ``` ``` error[E0080]: evaluation of `Fail::<i32>::C` failed --> $DIR/collect-in-dead-closure.rs:9:19 | LL | const C: () = panic!(); | ^^^^^^^^ evaluation panicked: explicit panic | = note: this error originates in the macro `$crate::panic::panic_2015` which comes from the expansion of the macro `panic` (in Nightly builds, run with -Z macro-backtrace for more info) ``` ``` error[E0080]: evaluation of constant value failed --> $DIR/uninhabited.rs:41:9 | LL | assert!(false); | ^^^^^^^^^^^^^^ evaluation panicked: assertion failed: false | = note: this error originates in the macro `assert` (in Nightly builds, run with -Z macro-backtrace for more info) ``` --- When the primary span for a const error is the same as the first frame in the const error report, skip it. ``` error[E0080]: evaluation of constant value failed --> $DIR/issue-88434-removal-index-should-be-less.rs:3:24 | LL | const _CONST: &[u8] = &f(&[], |_| {}); | ^^^^^^^^^^^^^^ evaluation panicked: explicit panic | note: inside `f::<{closure@$DIR/issue-88434-removal-index-should-be-less.rs:3:31: 3:34}>` --> $DIR/issue-88434-removal-index-should-be-less.rs:10:5 | LL | panic!() | ^^^^^^^^ the failure occurred here = note: this error originates in the macro `$crate::panic::panic_2015` which comes from the expansion of the macro `panic` (in Nightly builds, run with -Z macro-backtrace for more info) ``` instead of ``` error[E0080]: evaluation of constant value failed --> $DIR/issue-88434-removal-index-should-be-less.rs:10:5 | LL | panic!() | ^^^^^^^^ explicit panic | note: inside `f::<{closure@$DIR/issue-88434-removal-index-should-be-less.rs:3:31: 3:34}>` --> $DIR/issue-88434-removal-index-should-be-less.rs:10:5 | LL | panic!() | ^^^^^^^^ note: inside `_CONST` --> $DIR/issue-88434-removal-index-should-be-less.rs:3:24 | LL | const _CONST: &[u8] = &f(&[], |_| {}); | ^^^^^^^^^^^^^^ = note: this error originates in the macro `$crate::panic::panic_2015` which comes from the expansion of the macro `panic` (in Nightly builds, run with -Z macro-backtrace for more info) ``` --- Revert order of constant evaluation errors Point at the code the user wrote first and std functions last. ``` error[E0080]: evaluation of constant value failed --> $DIR/const-errs-dont-conflict-103369.rs:5:25 | LL | impl ConstGenericTrait<{my_fn(1)}> for () {} | ^^^^^^^^ evaluation panicked: Some error occurred | note: called from `my_fn` --> $DIR/const-errs-dont-conflict-103369.rs:10:5 | LL | panic!("Some error occurred"); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ = note: this error originates in the macro `$crate::panic::panic_2015` which comes from the expansion of the macro `panic` (in Nightly builds, run with -Z macro-backtrace for more info) ``` instead of ``` error[E0080]: evaluation of constant value failed --> $DIR/const-errs-dont-conflict-103369.rs:10:5 | LL | panic!("Some error occurred"); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Some error occurred | note: called from `<() as ConstGenericTrait<{my_fn(1)}>>::{constant#0}` --> $DIR/const-errs-dont-conflict-103369.rs:5:25 | LL | impl ConstGenericTrait<{my_fn(1)}> for () {} | ^^^^^^^^ = note: this error originates in the macro `$crate::panic::panic_2015` which comes from the expansion of the macro `panic` (in Nightly builds, run with -Z macro-backtrace for more info) ```
2025-02-28rename BackendRepr::Vector → SimdVectorRalf Jung-1/+1
2025-02-28Fully qualify `Result` in generated doctest codeGuillaume Gomez-2/+2
2025-02-28Implement `RunMake` test suite using the `test!` macroJakub Beránek-34/+4
2025-02-28Implement `RunMakeSupport` tool using the `bootstrap_tool!` macroJakub Beránek-53/+1
2025-02-28Allow specifying that tools build a library, not a binaryJakub Beránek-4/+36
2025-02-28Create the `OptimizedDist` tool with a macroJakub Beránek-39/+1
2025-02-28use fixed-width integer types in C codeRalf Jung-36/+38
2025-02-28miri native-call support: all previously exposed provenance is accessible to ↵Ralf Jung-23/+87
the callee
2025-02-28Rollup merge of #137693 - aDotInTheVoid:gaming, r=onur-ozkan,GuillaumeGomez许杰友 Jieyou Xu (Joe)-3/+1
Re-enable `--generate-link-to-defintion` for tools internal rustdoc ~~These were removed because they used to break the build: https://github.com/rust-lang/rust/pull/122066#issuecomment-1983049222, but testing locally it seems to work now.~~ This was re enabled in #136589, but only for rustc, not tools. The FIXME that prompted removing this is still present. Do we have an issue with an MCVE for this? CC ```@GuillaumeGomez``` https://github.com/rust-lang/rust/blob/ac91805f3179fc2225c60e8ccf5a1daa09d43f3d/src/librustdoc/html/render/span_map.rs#L178-L182 try-job: aarch64-apple
2025-02-28Rollup merge of #137676 - petrochenkov:winresp, r=Kobzol许杰友 Jieyou Xu (Joe)-11/+31
linker: Fix escaping style for response files on Windows If we use a С/С++ compiler as linker, then Posix-style escaping should be used. Also temporarily fixup rustbuild to not fail at least in common scenarios, until the bootstrap compiler is updated. Fixes https://github.com/rust-lang/rust/issues/137498
2025-02-28Rollup merge of #137778 - EnzymeAD:update-enzyme-range, r=oli-obk许杰友 Jieyou Xu (Joe)-0/+0
update enzyme to handle range metadata r? `@oli-obk` I landed two PRs over the last days, one of which is especially important because Enzyme now handles range metadata correctly. This allows a larger Rust project to compile. Tracking: - https://github.com/rust-lang/rust/issues/124509
2025-02-28Rollup merge of #137712 - meithecatte:extract-binding-mode, r=oli-obk许杰友 Jieyou Xu (Joe)-1/+0
Clean up TypeckResults::extract_binding_mode - Remove the `Option` from the result type, as `None` is never returned. - Document the difference from the `BindingMode` in `PatKind::Binding`.
2025-02-28Rollup merge of #137220 - ferrocene:pa-channel-ci, r=Kobzol许杰友 Jieyou Xu (Joe)-1/+10
Support `rust.channel = "auto-detect"` As [discussed in Zulip](https://rust-lang.zulipchat.com/#narrow/channel/326414-t-infra.2Fbootstrap/topic/vibe.20check.20for.20a.20few.20config.20changes), this PR adds the new `"auto-detect"` value for `rust.channel`, to load the channel name from `src/ci/channel`. Note that in a previous iteration of this PR the value was "ci" instead of "auto-detect".