about summary refs log tree commit diff
path: root/src/tools/rust-analyzer/crates/hir
AgeCommit message (Collapse)AuthorLines
2024-05-25Fix `data_constructor` ignoring generics for structTavo Annus-5/+7
2024-05-22fix: ensure implied bounds from associated types are considered in autocompleteDavid Barsky-1/+2
2024-05-22internal: refactor `prefer_no_std`/`prefer_prelude` bools into a structDavid Barsky-94/+30
2024-05-22Auto merge of #17277 - Veykril:find-path-fixes, r=Veykrilbors-25/+7
fix: Various find path fixes Fixes https://github.com/rust-lang/rust-analyzer/issues/17271
2024-05-22Update assists test fixturesLukas Wirth-17/+1
2024-05-22fix: Fix general find-path inconsistenciesLukas Wirth-13/+11
2024-05-18Show fn traits in signature info for trait implementorsLukas Wirth-20/+27
2024-05-18Render closure fn trait kind in siganture helpLukas Wirth-22/+32
2024-05-18Allow hir::Param to refer to other entity params aside from functionsLukas Wirth-65/+62
2024-05-18Update builtin tool listLukas Wirth-18/+5
2024-05-16internal: Add StaticLifetime to hir APILukas Wirth-0/+9
2024-05-13Auto merge of #17221 - Veykril:lazier-validation, r=Veykrilbors-21/+80
internal: Lazier macro parse tree validation
2024-05-13`parse_macro_expansion_error` almost never contains values so `Option` itLukas Wirth-3/+5
2024-05-13Push macro-parsing error calculation out of fundamental queriesLukas Wirth-21/+78
2024-05-13Auto merge of #17220 - Veykril:hov-lit, r=Veykrilbors-0/+14
fix: Improve confusing literal hovers
2024-05-13Fix literal hovers being confusing and wrong for floatsLukas Wirth-0/+14
2024-05-08Make term search fuel configurableTavo Annus-4/+9
2024-05-07Use unit of work as fuel instead of timeTavo Annus-41/+47
2024-05-06Add time based fuel to term searchTavo Annus-7/+34
2024-05-06Collapse term search exprs before Cartesian product to avoid OOMTavo Annus-14/+38
2024-04-30fix: Tracing span names should match function namesWilfred Hughes-4/+5
When viewing traces, it's slightly confusing when the span name doesn't match the function name. Ensure the names are consistent. (It might be worth moving most of these to use #[tracing::instrument] so the name can never go stale. @davidbarsky suggested that is marginally slower, so I've just done the simple change here.)
2024-04-30Auto merge of #17138 - Kohei316:generate-function-assist-for-new, r=Veykrilbors-0/+8
feature: Make generate function assist generate a function as a constructor if the generated function has the name "new" and is an asscociated function. close #17050 This PR makes `generate function assist` generate a function as a constructor if the generated function has the name "new" and is an asscociated function. If the asscociate type is a record struct, it generates the constructor like this. ```rust impl Foo { fn new() -> Self { Self { field_1: todo!(), field_2: todo!() } } } ``` If the asscociate type is a tuple struct, it generates the constructor like this. ```rust impl Foo { fn new() -> Self { Self(todo!(), todo!()) } } ``` If the asscociate type is a unit struct, it generates the constructor like this. ```rust impl Foo { fn new() -> Self { Self } } ``` If the asscociate type is another adt, it generates the constructor like this. ```rust impl Foo { fn new() -> Self { todo!() } } ```
2024-04-30Make generate function assist generate a function as a constructor if the ↵morine0122-0/+13281
name of function is new
2024-04-26Show workspace info in the status barLukas Wirth-5/+7
2024-04-25Auto merge of #17021 - roife:add-hover-limits-for-adts, r=Veykrilbors-55/+95
Support hovering limits for adts Fix #17009 1. Currently, r-a supports limiting the number of struct fields displayed when hovering. This PR extends it to support enum variants and union fields. Since the display of these three (ADTs) is similar, this PR extends 'hover_show_structFields' to 'hover_show_adtFieldsOrVariants'. 2. This PR also resolved the problem that the layout of ADT was not restricted by display limitations when hovering on the Self type. 3. Additionally, this PR changes the default value of display limitations to `10` (instead of the original `null`), which helps users discover this feature.
2024-04-23different error code based on variantBao Zhiyuan-2/+4
2024-04-21Allow rust files to be used linkedProjectsLukas Wirth-0/+13301
2024-04-20fix: remove space within `{}` when no fields in structroife-10/+14
2024-04-20Add hovering limitations support for variantsroife-21/+16
2024-04-19fix: add a separate setting for enum variantsroife-9/+57
2024-04-16Update tests and docs for hover_show_adtFieldsOrVariantsroife-19/+4
2024-04-16Add config hover_show_adtFieldsOrVariants to handle hovering limitation for ADTsroife-0/+13283