Lukas Wirth
3c862507b9
Add render configs for memory layout hovers
2023-05-30 18:36:06 +02:00
Lukas Wirth
3514f2f2ab
Render niches on hover
2023-05-30 13:49:43 +02:00
Lukas Wirth
be9cc0baae
Render size, align and offset hover values in hex
2023-05-26 16:41:45 +02:00
hkalbasi
60379dabfb
resolve types in closure capture copy detection
2023-05-19 14:54:57 +03:30
hkalbasi
cae9660a1d
Add layout info for enum variant and locals
2023-05-18 21:03:03 +03:30
Lukas Wirth
ba8bcde4f5
Also render coercions for ranged type hover on closures
2023-05-15 19:45:01 +02:00
Lukas Wirth
08dc0e21af
feat: Render hover actions for closure captures and sig
2023-05-15 19:35:27 +02:00
Yury Ivanou
8e1ba7fdab
Fix memory layout config not working for closures
2023-05-07 19:10:01 +03:00
Yury Ivanou
4ed0fa8414
Add config for disabling hover memory layout data
2023-05-07 18:21:07 +03:00
Yury Ivanou
ecc081d625
Show type alias layout on hover
2023-05-06 16:58:57 +03:00
bors
94ac1cdbf5
Auto merge of #14715 - Veykril:symbol-index, r=Veykril
...
Refactor symbol index
Closes https://github.com/rust-lang/rust-analyzer/issues/14677
instead of eagerly fetching the source data in symbol index we do it lazily now, this shouldn't make it much more expensive as we had to parse the source most of the time anyways even after fetching.
2023-05-02 10:34:53 +00:00
Lukas Wirth
f501c6a516
Refactor symbol index
2023-05-02 12:11:42 +02:00
Jake Heinz
3132a9e7fc
fix: ide: exclude sized in go-to actions
2023-05-02 08:19:59 +00:00
hkalbasi
6312fbf521
MIR episode 4
2023-05-01 23:23:10 +03:30
hkalbasi
5df545b3f0
Add hover for closure
2023-04-30 14:31:43 +03:30
Josh Soref
bc7d84c3ce
Spelling
...
* a rule
* access
* after
* amount
* annotations
* assignment
* assist
* associated
* attribute
* borrowed
* built-in type
* clarification
* command
* const
* constructor
* corresponding
* counterparts
* curlies
* dependencies
* deterministic
* diagnostic
* duplicates
* edge
* edited
* efficient
* elsewhere
* execution
* expression
* extensions
* extracted
* fill
* github
* helper
* heuristic
* incomplete
* indent end
* inlay
* invocation
* lifetime
* looking
* maybe
* move
* mutability
* mutable
* necessarily
* necessary
* negative
* nonexistent
* occurred
* offsets
* offsetted
* overridden
* parameters
* params
* params_and_where_preds_in_scope
* paredit
* parent
* parentheses
* prepended if
* punctuation
* receive
* receiver
* referring
* repeated
* representing
* semantically
* separately
* shouldnot
* siblings
* similar
* something's
* statement
* struct
* structure
* surprise
* the
* this
* transparent
* unimplemented
* unnamed
* unnecessary
* unneeded
* unreachable
* unterminated
* utilities
* variant
* variants
* visibility
* work around (v)
* workaround
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
2023-04-19 09:45:55 -04:00
Ryo Yoshida
584d2697cc
Add toolchain
meta for tests
2023-04-11 21:21:10 +09:00
hkalbasi
59b6f2d9f2
Compute closure captures
2023-04-10 23:04:34 +03:30
hkalbasi
b7b9ae59a0
desugar ? operator
2023-03-17 13:08:35 +03:30
hkalbasi
ae8ce99d97
Bring back the hex in const hover
2023-03-05 13:53:49 +03:30
Lukas Wirth
5a91f015b4
internal: Handle fields called as method calls as the fields they resolve to
2023-03-04 20:33:28 +01:00
bors
32424d0aba
Auto merge of #14176 - lowr:fix/assoc-func-vis-in-local-impl, r=Veykril
...
Fix associated item visibility in block-local impls
Fixes #14046
When we're resolving visibility of block-local items...
> `self` normally refers to the containing non-block module, and `super` to its parent (etc.). However, visibilities must only refer to a module in the DefMap they're written in, so we restrict them when that happens. ([link])
...unless we're resolving visibility of associated items in block-local impls, because that impl is semantically "hoisted" to the nearest (non-block) module. With this PR, we skip the adjustment for such items.
Since visibility representation of those items is modified, this PR also adjusts visibility rendering in `HirDisplay`.
[link]: a6603fc21d/crates/hir-def/src/nameres/path_resolution.rs (L101-L103)
2023-03-01 12:40:55 +00:00
hkalbasi
f64fe66c2a
Add tuple to render_const_scalar
2023-02-28 23:12:30 +03:30
hkalbasi
cd67589f63
beginning of MIR
2023-02-27 23:45:54 +03:30
Ryo Yoshida
d4166234ef
Adjust block-local impl item visibility rendering
2023-02-20 00:44:51 +09:00
Lukas Wirth
e550e553e0
fix: Bring back hovering call parens for return type info
2023-02-15 18:58:59 +01:00
Lukas Wirth
4685b97f74
Remove hover fallback in favor of ranged hover
2023-01-20 21:52:05 +01:00
Lukas Wirth
a542bd46bf
Split out some hover functions
2023-01-20 16:30:08 +01:00
Lukas Wirth
c5b1e3f2ae
Fix markdown removal in hover handling whitespace weirdly
2023-01-20 14:29:12 +01:00
hkalbasi
ec65b3b3aa
fix tests
2023-01-16 23:45:12 +03:30
Yuri Astrakhan
e16c76e3c3
Inline all format arguments where possible
...
This makes code more readale and concise,
moving all format arguments like `format!("{}", foo)`
into the more compact `format!("{foo}")` form.
The change was automatically created with, so there are far less change
of an accidental typo.
```
cargo clippy --fix -- -A clippy::all -W clippy::uninlined_format_args
```
2022-12-24 14:36:10 -05:00
Ryo Yoshida
bb99d2a6fb
fix: resolve all inference vars in InferenceResult::assoc_resolutions
2022-12-14 23:07:43 +09:00
bors
a3ea20a142
Auto merge of #13725 - bvanjoi:resolve-const-triat-impls, r=flodiebold
...
feat: resolve const for trait impls
Fixed #13694
2022-12-10 13:58:28 +00:00
bvanjoi
7012b50db5
feat: resolve const for trait impls( close #13694 )
2022-12-10 20:06:25 +08:00
Lukas Wirth
e80674e6b3
Show type info on hover of enum variant fields
2022-12-09 10:09:55 +01:00
hkalbasi
05906da0ec
use rustc crates instead of copy paste
2022-12-07 01:59:38 +03:30
hkalbasi
86b5b609f1
Compute data layout of types
2022-12-04 00:29:34 +03:30
Kartavya Vashishtha
91e7624de0
add hover tests
2022-11-25 12:20:38 +05:30
Lukas Wirth
8047512dca
Revert "feat: Diagnose some incorrect usages of the question mark operator"
2022-10-18 14:18:59 +02:00
Lukas Wirth
381366f1dd
Diagnose incorrect usages of the question mark operator
2022-10-16 12:58:24 +02:00
OleStrohm
301b8894ea
Added more consteval tests and fixed consteval result
2022-09-12 20:20:45 +01:00
OleStrohm
ad0a6bf1a3
Added consteval tests
2022-09-12 20:20:43 +01:00
OleStrohm
2f84b6e2e5
Almost there
2022-09-12 20:20:22 +01:00
OleStrohm
997fc46efa
Implemented basic enum const eval
2022-09-12 20:19:13 +01:00
Chayim Refael Friedman
26b5f1f92f
Do not insert a newline after ;
if the next token is a }
...
This creates double newline.
2022-09-04 14:33:15 +00:00
Chayim Refael Friedman
e295f0c29c
Insert whitespaces into static & const bodies if they are expanded from macro on hover
...
Macro expansion erases whitespace information, and so we end with invalid Rust code.
2022-09-04 14:33:15 +00:00
Jonas Schievink
0616cee92b
Add a setting for keyword hover popups
2022-08-16 16:51:40 +02:00
Lukas Wirth
d6e78b04d0
feat: Handle operators like their trait functions in the IDE
2022-08-05 14:16:36 +02:00
Artur Sinila
b9b42e8670
tests: add hover tests for const generics
2022-07-17 02:13:09 +03:00
Lukas Wirth
531e152390
fix: Simplify macro statement expansion handling
2022-07-01 14:49:30 +02:00