about summary refs log tree commit diff
path: root/src/tools
AgeCommit message (Collapse)AuthorLines
2025-03-02Merge pull request #19266 from the-mikedavis/lsp-pull-diagnostics-identifierLaurențiu Nicola-1/+1
Add `identifier` to pull diagnostic LSP capabilities
2025-03-02Add `identifier` to pull diagnostic LSP capabilitiesMichael Davis-1/+1
This field in the server capabilities instructs the client to maintain the diagnostics received from a `textDocument/diagnostic` pull request as a separate set from other diagnostics: namely those sent with classic "push" diagnostics, `textDocument/publishDiagnostic`. rust-analyzer emits "native" diagnostics (computed by rust-analyzer itself) in pull diagnostics and separately emits cargo-based diagnostics with push, so push and pull diagnostics should be different sets. Setting this field instructs the client to avoid clearing push diagnostics when new pull diagnostics arrive and vice versa.
2025-03-02add diagnostic for dangling implbit-aloo-3/+40
2025-03-02add diagnostic for dangling dynbit-aloo-9/+43
2025-03-02Fix transparent diagnosticsLaurențiu Nicola-6/+1
2025-03-02Remove layouting dead code for non-array SIMD types.Moulins-36/+11
These aren't supported anymore, and are already rejected in type checking.
2025-03-02clippyRalf Jung-2/+1
2025-03-02Normalize some assist namesLukas Wirth-288/+299
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-02Merge from rustcThe Miri Cronjob Bot-15556/+34772
2025-03-02Preparing for merge from rustcThe Miri Cronjob Bot-1/+1
2025-03-02Auto merge of #137855 - matthiaskrgr:rollup-uh7f3fi, r=matthiaskrgrbors-1/+1
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-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/+69
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 #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 #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-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-01Migrate `convert_bool_then` to `SyntaxEditor`Shoyu Vanilla-60/+174
Update assist docs
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-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 #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-28Update cargoWeihang Lo-0/+0
2025-02-28Have inline_local_variable use precedence calculation for parenthesesLukas Wirth-67/+44
2025-02-28Merge pull request #19249 from Veykril/push-noosrywrsuvnLukas Wirth-11/+22
Fix prefix adjustment hints unnecessarily introducing parens
2025-02-28Fix prefix adjustment hints unnecessarily introducing parensLukas Wirth-11/+22
2025-02-28update enzyme to handle range metadataManuel Drehwald-0/+0
2025-02-28Add `dist:Gcc` build stepJakub Beránek-0/+1
To distribute the prebuilt libgccjit.so from CI.
2025-02-28Merge pull request #19246 from ncrothers/add-anchor-for-associated-itemsLukas Wirth-7/+99
Add anchor for intra-doc links to associated items
2025-02-28add testbit-aloo-0/+24