about summary refs log tree commit diff
path: root/src/tools/rust-analyzer/crates
AgeCommit message (Collapse)AuthorLines
2025-01-29Auto merge of #136117 - lnicola:sync-from-ra, r=lnicolabors-1293/+2031
Subtree update of `rust-analyzer` r? `@ghost`
2025-01-28parse_format optimize import useMarijn Schouten-2/+2
2025-01-26Merge pull request #19034 from ChayimFriedman2/complete-hidden-variantLukas Wirth-55/+102
fix: Don't complete doc(hidden) enum variants and use trees
2025-01-26Merge pull request #19033 from ChayimFriedman2/span-1Chayim Refael Friedman-4/+4
fix: Make proc_macro span's line & column 1-indexed, as documented
2025-01-26Make proc_macro span's line & column 1-indexed, as documentedChayim Refael Friedman-4/+4
That is, make the fake number that we return 1 and not 0.
2025-01-26Don't complete doc(hidden) enum variants and use treesChayim Refael Friedman-55/+102
Also refactor the check a bit.
2025-01-25Merge pull request #19020 from ShoyuVanilla/issues-19007Lukas Wirth-35/+129
fix: Prevent infinite recursion of bounds formatting
2025-01-26fix: Prevent infinite recursion of bounds formattingShoyu Vanilla-72/+129
2025-01-25Merge pull request #19030 from Veykril/push-wuzvopyooznmLukas Wirth-1/+5
fix: Fix markdown horizontal ruler sometimes being treated as a heading
2025-01-25fix: Fix markdown horizontal ruler sometimes being treated as a headingLukas Wirth-1/+5
2025-01-25Use `strict_provenance`Lukas Wirth-31/+7
2025-01-25Skip redundant path search in `resolve_completion_edits`Lukas Wirth-49/+26
2025-01-25Merge pull request #19028 from Veykril/push-vuytpkvqzwzsLukas Wirth-20/+89
fix: Fix flyimport not filtering via stability of import path
2025-01-25Fix flyimport not filtering via stability of import pathLukas Wirth-20/+89
2025-01-25Merge pull request #19026 from Veykril/push-wrxrutptywzxLukas Wirth-48/+72
Only collect implicit visibile use symbols if they have renames
2025-01-25Only collect implicit visibile use symbols if they have renamesLukas Wirth-48/+72
Otherwise this will pollute the index too much with unnecessary symbols
2025-01-25Merge pull request #18973 from ThouCheese/feat/nice-nichesLukas Wirth-2/+85
Make niches into nices
2025-01-25Merge pull request #19023 from Wilfred/sequence_type_namesLukas Wirth-10/+93
minor: Suggest better names when a type is a sequence
2025-01-24minor: Suggest better names when a type is a sequenceWilfred Hughes-10/+93
Previously, we'd suggest a type of `vec` for a value of type `Vec<T>`, which is rarely what the user wants. We also had no suggestions for values of type `&[T]`. Instead, try to pluralise the inner type name, and fall back to `items`.
2025-01-24Explicitly add buildfiles when constructing ProjectFoldersDavid Richey-21/+38
2025-01-24Merge pull request #19018 from Veykril/push-wxqqunxwrplyLukas Wirth-95/+112
internal: Record the use tree index in glob imports
2025-01-24Merge pull request #18991 from Veykril/push-rmqmnrymwmozLukas Wirth-322/+433
Keep already computed inlay hint properties instead of late resolving them
2025-01-24Lazily compute location links in type hints againLukas Wirth-9/+18
2025-01-24Record the use tree index in glob importsLukas Wirth-95/+112
2025-01-24Add a new failing test that overflows stackShoyu Vanilla-0/+37
2025-01-24Merge pull request #19012 from ShoyuVanilla/arbitrary-selfLukas Wirth-26/+129
feat: Implement `arbitrary-self-types`
2025-01-24feat: Implement `arbitrary-self-types`Shoyu Vanilla-26/+129
2025-01-24Merge pull request #19017 from Veykril/push-uktrsknwmsvyLukas Wirth-10/+26
fix: Fix flycheck panicking with "once" invocation strategy
2025-01-24Merge pull request #18993 from ChayimFriedman2/iter-configLukas Wirth-56/+81
feat: Provide a config to control auto-insertion of `await` and `iter()`
2025-01-24Merge pull request #18994 from Wilfred/failed_rustc_cfg_as_warningLukas Wirth-1/+1
internal: Treat cfg fetching failures as a warning
2025-01-24Merge pull request #19016 from Veykril/push-moqnsytyrupuLukas Wirth-208/+234
fix: Fix `ItemScope` not recording glob imports
2025-01-24fix: Fix flycheck panicking with "once" invocation strategyLukas Wirth-10/+26
We only ever have one flycheck runner no matter the number of workspaces, so just kick off flycheck for it immediately
2025-01-24Fix `ItemScope` not recording glob importsLukas Wirth-208/+234
This caused us other code to incorrectly assume in dealing with a declaration when in fact it was dealing with a glob imported definition
2025-01-23Check cfg when collecting macro defsDavid Richey-0/+6
2025-01-22increase `AUTODEREF_RECURSION_LIMIT` to 20Teodor Tanasoaia-2/+2
The limit was introduced in https://github.com/rust-lang/rust-analyzer/pull/1408#discussion_r294059044 to avoid infinite cycles but it effectively caps the number of derefs to 10. Types like `ID3D12Device14` from the `windows` crate run into this because it derefs to `ID3D12Device13`, 13 to 12 and so on. Increasing it to 20 is a quick fix; a better cycle detection method would be nicer long term.
2025-01-21manual: Document all rust-project.json fieldsWilfred Hughes-1/+1
Ensure that all the fields that rust-analyzer understands are in the manual, they all have doc comments, and they use consistent punctuation (`;` rather than mixing `,` and `;`). Whilst we're here, fix the `sysroot_src` example and add 2024 as a legal value for Rust edition.
2025-01-21internal: Treat cfg fetching failures as a warningWilfred Hughes-1/+1
If the user doesn't have rustc on $PATH, rust-analyzer won't be able to run `rustc --print cfg`. This isn't really an error, as rust-analyzer can still proceed without it. This is particularly noticeable when loading crates defined in a rust-project.json. Until the configuration is loaded, the opened files are briefly treated as detached files and users see this error. Environments with rust-project.json generally have a sysroot and rustc elsewhere, so the error confuses users.
2025-01-21Provide a config to control auto-insertion of `await` and `iter()`Chayim Refael Friedman-56/+81
2025-01-21Keep already computed inlay hint properties instead of late resolving themLukas Wirth-92/+99
2025-01-21Make `InlayHint::linked_location` computation lazyLukas Wirth-204/+285
2025-01-21remove is_pwr2Luuk Wester-17/+3
2025-01-21switch from using leading zeros to trailing zerosLuuk Wester-1/+4
2025-01-21Fix Param::as_local treating closures wrongLukas Wirth-53/+67
2025-01-21Sort completion items that skip `await` and `iter()` behind those that don'tChayim Refael Friedman-0/+26
I don't think my ranking is perfect, because it places them even behind snippet completions, but this is something.
2025-01-21make large niche description more terse, switch to using u128::is_power_of_twoLuuk Wester-5/+5
2025-01-21Merge pull request #18986 from Veykril/push-zlwvwlowpzqmLukas Wirth-0/+49
Goto `Display::fmt` when invoked on `to_string`
2025-01-21Cleanup `Name` string renderingLukas Wirth-249/+145
2025-01-21Merge pull request #18977 from ChayimFriedman2/fix-upmappingLukas Wirth-13/+68
fix: Fix missing upmapping in trait impls completion
2025-01-20Fix another bug with completion of trait items inside macrosChayim Refael Friedman-11/+36
This time, when completing the keyword (e.g. `fn` + whitespace). The bug was actually a double-bug: First, we did not resolve the impl in the macro-expanded file but in the real file, which of course cannot work. Second, in analysis the whitespace was correlated with the `impl` and not the incomplete `fn`, which caused fake (where we insert an identifier after the whitespace) and real expansions to go out of sync, which failed analysis. The fix is to skip whitespaces in analysis.
2025-01-20Goto `Display::fmt` when invoked on `to_string`Lukas Wirth-0/+49