summary refs log tree commit diff
path: root/src/tools/rust-analyzer/crates/ide
AgeCommit message (Collapse)AuthorLines
2024-05-31docs: Missing word typoLuke Franceschini-1/+1
2024-05-25Avoid clone when constructing runnable label.Mathew Horner-1/+1
2024-05-23Auto merge of #17284 - Veykril:doc-links, r=Veykrilbors-3/+7
fix: Use correct toolchain channel when generating builtin type doc links
2024-05-23Use correct toolchain channel when generating builtin type doc linksLukas Wirth-3/+7
2024-05-23Auto merge of #17174 - Kohei316:fix-infer-async-block-with-tail-return-expr, ↵bors-0/+26
r=Veykril Fix: infer type of async block with tail return expr Fixes #17106 The `infer_async_block` method calls the `infer_block` method internally, which returns the never type without coercion when `tail_expr` is `None` and `ctx.diverges` is `Diverges::Always`.This is the reason for the bug in this issue. https://github.com/rust-lang/rust-analyzer/blob/cfce2bb46da62950a8b70ddb0b2a12332da1b1e1/crates/hir-ty/src/infer/expr.rs#L1411-L1413 This PR solves the bug by adding a process to coerce after calling `infer_block` method. This code passes all the tests, including tests I added for this isuue, however, I am not sure if this solution is right. I think that this solution is an ad hoc solution. So, I would appreciate to have your review. I apologize if I'm off the mark, but `infer_async_block` method should be rewritten to share code with the process of infering type of `expr::Closure` instead of the `infer_block` method. That way it will be closer to the infer process of rustc.
2024-05-18Show fn traits in signature info for trait implementorsLukas Wirth-15/+95
2024-05-18Enable linked locations for closure param inlay hintsLukas Wirth-10/+5
2024-05-18Render closure fn trait kind in siganture helpLukas Wirth-5/+36
2024-05-18Allow hir::Param to refer to other entity params aside from functionsLukas Wirth-30/+30
2024-05-16internal: Add StaticLifetime to hir APILukas Wirth-32/+43
2024-05-14internal: Sort computed runnablesLukas Wirth-20/+34
2024-05-14Auto merge of #17225 - Veykril:expand-macro-interlocked, r=Veykrilbors-27/+15
Expand macro recursively expands both fp-like and attribute macros when intertwined
2024-05-14Expand macro recursively expands both fp-like and attribute macros intertwinedLukas Wirth-27/+15
2024-05-13Don't render multi-line literal valuesLukas Wirth-1/+29
2024-05-13Render literal escaping errors in hoversLukas Wirth-12/+12
2024-05-13Fix literal hovers being confusing and wrong for floatsLukas Wirth-97/+157
2024-05-06Implement unsafe attribute parsingLukas Wirth-5/+9
2024-04-30fix: Tracing span names should match function namesWilfred Hughes-1/+1
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-30Fix coercion of async blockmorine0122-0/+26
2024-04-25Auto merge of #17134 - Veykril:lt-err-display, r=Veykrilbors-1/+20
internal: Don't render unknown lifetimes when rendering generic args cc https://github.com/rust-lang/rust-analyzer/issues/17098
2024-04-25Auto merge of #17021 - roife:add-hover-limits-for-adts, r=Veykrilbors-34/+443
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-25Add inlay hints lifetime arg testsLukas Wirth-1/+20
2024-04-21Auto merge of #16938 - Nilstrieb:dont-panic-tests, r=Veykrilbors-7/+7
Implement `BeginPanic` handling in const eval for #16935, needs some figuring out of how to write these tests correctly
2024-04-21Allow rust files to be used linkedProjectsLukas Wirth-0/+48752
2024-04-21Peek for panic message in test outputLukas Wirth-7/+7
2024-04-20fix: remove space within `{}` when no fields in structroife-1/+21
2024-04-20Add hovering limitations support for variantsroife-20/+115
2024-04-19fix: add a separate setting for enum variantsroife-36/+102
2024-04-18Handle panicking like rustc CTFE doesNilstrieb-0/+48712
Instead of using `core::fmt::format` to format panic messages, which may in turn panic too and cause recursive panics and other messy things, redirect `panic_fmt` to `const_panic_fmt` like CTFE, which in turn goes to `panic_display` and does the things normally. See the tests for the full call stack.
2024-04-16fix: adjust the limitation for ADTs' fields to 5roife-4/+4
2024-04-16fix: the fields or variants of ADT was not restricted by limitations when ↵roife-3/+40
hovering on Self type
2024-04-16Update tests and docs for hover_show_adtFieldsOrVariantsroife-34/+225
2024-04-16Add config hover_show_adtFieldsOrVariants to handle hovering limitation for ADTsroife-0/+48672