about summary refs log tree commit diff
path: root/src/tools/rust-analyzer
AgeCommit message (Collapse)AuthorLines
2025-07-07Auto merge of #143601 - matthiaskrgr:rollup-9iw2sqk, r=matthiaskrgrbors-25/+25
Rollup of 9 pull requests Successful merges: - rust-lang/rust#132469 (Do not suggest borrow that is already there in fully-qualified call) - rust-lang/rust#143340 (awhile -> a while where appropriate) - rust-lang/rust#143438 (Fix the link in `rustdoc.md`) - rust-lang/rust#143539 (Regression tests for repr ICEs) - rust-lang/rust#143566 (Fix `x86_64-unknown-netbsd` platform support page) - rust-lang/rust#143572 (Remove unused allow attrs) - rust-lang/rust#143583 (`loop_match`: fix 'no terminator on block') - rust-lang/rust#143584 (make `Machine::load_mir` infallible) - rust-lang/rust#143591 (Fix missing words in future tracking issue) r? `@ghost` `@rustbot` modify labels: rollup
2025-07-07Rollup merge of #143340 - nabijaczleweli:awhile, r=mati865Matthias Krüger-25/+25
awhile -> a while where appropriate
2025-07-07Auto merge of #143182 - xdoardo:more-addrspace, r=workingjubileebors-5/+6
Allow custom default address spaces and parse `p-` specifications in the datalayout string Some targets, such as CHERI, use as default an address space different from the "normal" default address space `0` (in the case of CHERI, [200 is used](https://www.cl.cam.ac.uk/techreports/UCAM-CL-TR-877.pdf)). Currently, `rustc` does not allow to specify custom address spaces and does not take into consideration [`p-` specifications in the datalayout string](https://llvm.org/docs/LangRef.html#langref-datalayout). This patch tries to mitigate these problems by allowing targets to define a custom default address space (while keeping the default value to address space `0`) and adding the code to parse the `p-` specifications in `rustc_abi`. The main changes are that `TargetDataLayout` now uses functions to refer to pointer-related informations, instead of having specific fields for the size and alignment of pointers in the default address space; furthermore, the two `pointer_size` and `pointer_align` fields in `TargetDataLayout` are replaced with an `FxHashMap` that holds info for all the possible address spaces, as parsed by the `p-` specifications. The potential performance drawbacks of not having ad-hoc fields for the default address space will be tested in this PR's CI run. r? workingjubilee
2025-07-07compiler: Parse `p-` specs in datalayout string, allow definition of custom ↵Edoardo Marangoni-5/+6
default data address space
2025-07-06Merge pull request #20184 from Veykril/push-ywpynxnltpokLukas Wirth-32/+44
chore: Remove dead field from `InferenceContext`
2025-07-06chore: Remove dead field from `InferenceContext`Lukas Wirth-32/+44
2025-07-06Merge pull request #20132 from A4-Tacks/asmut-borrow-minicoreLukas Wirth-0/+34
Add AsMut, Borrow and BorrowMut to minicore and famous_defs
2025-07-06Merge pull request #20126 from Wilfred/no_unwrap_in_discover_projectsLukas Wirth-3/+8
fix: Avoid .unwrap() when running the discover command
2025-07-06Merge pull request #20179 from ChayimFriedman2/destructuring-assignment-neverLukas Wirth-2/+61
fix: Fix diverging destructuring assignments
2025-07-06Merge pull request #20175 from dianne/match-check-box-cleanupChayim Refael Friedman-60/+20
`hir_ty::match_check` cleanup: remove special handling for box patterns
2025-07-05Fix diverging destructuring assignmentsChayim Refael Friedman-2/+61
They need to return `!`, unlike diverging ordinary assignments. See the comment in the code.
2025-07-05Fix Borrow and BorrowMut define from beta stdA4-Tacks-2/+2
2025-07-04`hir_ty::match_check`: remove special handling for box patternsdianne-60/+20
2025-07-04remove syntaxTree from docsvinícius x-18/+0
2025-07-04fix: Avoid .unwrap() when running the discover commandWilfred Hughes-3/+8
Previously, the following configuration in settings.json: "rust-analyzer.workspace.discoverConfig": { "command": [ "oops", "develop-json", "{arg}" ], "progressLabel": "rust-analyzer", "filesToWatch": [ "BUCK", "TARGETS" ] }, Would previously cause a crash in rust-analyzer: thread 'LspServer' panicked at crates/rust-analyzer/src/main_loop.rs:776:84: called `Result::unwrap()` on an `Err` value: Os { code: 2, kind: NotFound, message: "No such file or directory" } Instead, use more specific panic messages.
2025-07-04Merge pull request #20170 from Veykril/push-vtsmzopsunswLaurențiu Nicola-3/+12
Improve flycheck and build script progress reporting
2025-07-04Improve flycheck and build script progress reportingLukas Wirth-3/+12
2025-07-04Skip unnecessary `eq` work in `BodySourceMap`Lukas Wirth-11/+49
2025-07-04Merge pull request #20031 from jnyfah/some-branchLukas Wirth-35/+75
Fix: Resolve HIR display length issues and improve adjustment tooltips
2025-07-04minor: Handle match arm commas in `make::match_arm`Lukas Wirth-21/+11
Co-authored-by: Giga Bowser <45986823+Giga-Bowser@users.noreply.github.com>
2025-07-04Merge pull request #20148 from ShoyuVanilla/sysroot-no-depsLukas Wirth-4/+15
fix: Honor `rust-analyzer.cargo.noDeps` option when fetching sysroot metadata
2025-07-04Merge pull request #20165 from Hmikihiro/migrate-unmerge_match_armLukas Wirth-22/+20
Migrate `unmerge_match_arm` Assist to use `SyntaxEditor`
2025-07-04Merge pull request #20167 from ChayimFriedman2/enum-derive-defaultLukas Wirth-72/+190
fix: Fix some things with builtin derives
2025-07-03Add `fn load_workspace_into_db` variant for `ra_ap_load_cargo`'s `fn ↵Vincent Esche-8/+25
load_workspace`
2025-07-03Fix some things with builtin derivesChayim Refael Friedman-72/+190
1. Err on unions on derive where it's required. 2. Err on `#[derive(Default)]` on enums without `#[default]` variant. 3. Don't add where bounds `T: Default` when expanding `Default` on enums (structs need that, enums not). Also, because I was annoyed by that, in minicore, add a way to filter on multiple flags in the line-filter (`// :`). This is required for the `Debug` and `Hash` derives, because the derive should be in the prelude but the trait not.
2025-07-04Migrate `unmerge_match_arm` Assist to use `SyntaxEditor`Hayashi Mikihiro-22/+20
Signed-off-by: Hayashi Mikihiro <34ttrweoewiwe28@gmail.com>
2025-07-03Merge pull request #20161 from ShoyuVanilla/closure-captureLukas Wirth-5/+48
fix: Incorrect closure capturing for let exprs
2025-07-03Merge pull request #20120 from Hmikihiro/match_bind_not_typeChayim Refael Friedman-1/+74
fix: resolve item in match bind
2025-07-03fix: resolve item in match bindHayashi Mikihiro-1/+74
Signed-off-by: Hayashi Mikihiro <34ttrweoewiwe28@gmail.com>
2025-07-03fix: Closure capturing for let exprs, againShoyu Vanilla-5/+48
2025-07-03Merge pull request #20160 from Veykril/push-pqvskktpnyluLukas Wirth-49/+71
fix: Improve diagnostic ranges for `macro_calls!`
2025-07-03fix: Improve diagnostic ranges for `macro_calls!`Lukas Wirth-49/+71
We used to point to the entire macro call including its token tree if we couldn't upmap the diagnostic to the input This generally makes things very noisy as the entire macro call will turn red on errors. Instead, we now macro the path and `!` (bang) token as the error source range which is a lot nicer on the eyes.
2025-07-03Merge pull request #20159 from Veykril/push-kyssnlrxlwslLukas Wirth-15/+20
Always couple `--compile-time-deps` with
2025-07-03Always couple `--compile-time-deps` with Lukas Wirth-15/+20
`--all-targets` coupled with `--compile-time-deps` will never actually build binaries and so it won't fail for targets where libtest is missing
2025-07-03Merge pull request #20158 from Veykril/push-rquozrwuskryLukas Wirth-41/+56
fix: Do not warn about proc-macro srv when sysroot is missing
2025-07-03fix: Do not warn about proc-macro srv when sysroot is missingLukas Wirth-41/+56
2025-07-03Merge pull request #20157 from Veykril/push-nxrvpywtvoysLukas Wirth-13/+13
Re-enable fixpoint iteration for variance computation
2025-07-03Re-enable fixpoint iteration for variance computationLukas Wirth-13/+13
2025-07-03Merge pull request #19923 from Veykril/push-rlrsyxsqnxnnLukas Wirth-93/+155
Bump salsa
2025-07-03Bump salsaLukas Wirth-93/+155
2025-07-03Merge pull request #20112 from Veykril/push-ruszuxrqzmvzLukas Wirth-40/+22
Workaround missing none group support in builtin macros
2025-07-03Merge pull request #20156 from Veykril/push-knkzxuxkzoyxLukas Wirth-63/+105
Restructure proc-macro loading erros, differentiate hard error property on kind
2025-07-03Restructure proc-macro loading erros, differentiate hard error property on kindLukas Wirth-63/+105
2025-07-03Remove keyword prefixes (`macro@` or `macro `) from links in the docs only ↵Chayim Refael Friedman-6/+52
if the link target is inferred That is, do it for `[macro foo]`, but not for `[macro foo](macro foo)`.
2025-07-02awhile -> a while where appropriateнаб-25/+25
2025-07-03fix: Honor `rust-analyzer.cargo.noDeps` option when fetching sysroot metadataShoyu Vanilla-4/+15
2025-07-02Fix AsMut::as_mut nameA4-Tacks-1/+1
2025-07-02Migrate `wrap_unwrap_cfg_attr` assist to use `SyntaxEditor`Hayashi Mikihiro-42/+85
Signed-off-by: Hayashi Mikihiro <34ttrweoewiwe28@gmail.com>
2025-07-01Migrate `toggle_macro_delimiter` assist to `SyntaxEditor`Hayashi Mikihiro-12/+14
Signed-off-by: Hayashi Mikihiro <34ttrweoewiwe28@gmail.com>
2025-07-01Migrate `promote_local_to_const` Assist to `SyntaxEditor`Hayashi Mikihiro-9/+13
Signed-off-by: Hayashi Mikihiro <34ttrweoewiwe28@gmail.com>