Commit Graph

2136 Commits

Author SHA1 Message Date
Lukas Wirth
03fb1310c2 fix: Fix bind pat hint padding 2023-05-18 08:48:53 +02:00
bors
c06f088968 Auto merge of #14823 - Veykril:discriminant-inlays, r=Veykril
fix: Discriminant hints only render for datacarrying enums with primitive repr
2023-05-18 05:50:41 +00:00
bors
c4026bf9b9 Auto merge of #14818 - poliorcetics:type-hints-after-item, r=Veykril
fix: place type inlay hints after the item and without left-padding

**Before**:

![Type hints were placed before the item and there was left-padding that accentuaded the issue](https://github.com/rust-lang/rust-analyzer/assets/7951708/006a28e9-ed7b-4d49-a7e7-3c6da8efca79)

**After**:

![Type hints are now placed after the item and without padding since there already is `: ` in front of the type](https://github.com/rust-lang/rust-analyzer/assets/7951708/330a847f-8c59-40c7-877f-bf1aaced30e2)
2023-05-18 04:50:09 +00:00
bors
d0768aad62 Auto merge of #14812 - Veykril:highlight-trait-assoc, r=HKalbasi
feat: Highlight used trait assoc items when cursor is on trait import or trait bound
2023-05-18 01:53:30 +00:00
Lukas Wirth
c12ede8c34 fix: Discriminant hints only render for datacarrying enums with primitive repr 2023-05-16 22:15:39 +02:00
hkalbasi
a6e5a912f9 Expand format_args! with more details 2023-05-16 19:12:40 +03:30
Alexis (Poliorcetics) Bourget
22599adf9b fix: place type inlay hints after the item and without left-padding 2023-05-16 15:13:48 +02:00
Lukas Wirth
b87ee914fa feat: Highlight used trait assoc items when cursor is on trait import or trait bound 2023-05-15 20:41:35 +02:00
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
bors
1e6bd6cb0d Auto merge of #14794 - Veykril:inlay-kind-refac, r=Veykril
Restructure InlayHint, no longer derive properties from its kind

Closes https://github.com/rust-lang/rust-analyzer/issues/14595
2023-05-15 09:49:17 +00:00
bors
db8f39ce19 Auto merge of #14797 - Veykril:symbol-query, r=Veykril
fix: Fix perf regression from symbol index refactor

Should fix the regressions introduced by https://github.com/rust-lang/rust-analyzer/pull/14715 by partially rolling back the PR
2023-05-13 15:41:54 +00:00
Lukas Wirth
2e03b198ca fix: Fix perf regression from symbol index refactor 2023-05-13 17:41:09 +02:00
Lukas Wirth
8e116855f5 Add macro modifier for highlighting tokens in macro calls 2023-05-13 11:43:39 +02:00
Lukas Wirth
edd60f7b0d Simplify bind pat filtering 2023-05-13 11:02:57 +02:00
Lukas Wirth
730286b523 Restructure InlayHint, no longer derive properties from its kind 2023-05-13 10:42:26 +02:00
hkalbasi
cbcafd3539 MIR episode 5 2023-05-12 18:17:15 +03:30
Lukas Wirth
4b42acf617 Add basic support for augmentsSyntaxTokens 2023-05-10 20:48:51 +02:00
bors
aaed89ac04 Auto merge of #14763 - lnicola:dep-tree-fixes, r=lnicola
Fix manual formatting and remove duplicate command
2023-05-08 18:28:58 +00:00
Laurențiu Nicola
10637cf3e8 Fix formatting 2023-05-08 21:27:43 +03:00
Laurențiu Nicola
b632c7d322 Fix broken table 2023-05-08 21:27:35 +03:00
bors
d3ce333ec8 Auto merge of #14742 - Veykril:closure-capture-inlays, r=Veykril
feat: Closure capture inlay hints

I opted for a fictional `move(foo, &bar, &mut qux)` syntax here, disabled by default as these are not correct rust syntax and hence could cause confusion.
![image](https://user-images.githubusercontent.com/3757771/236447484-649a4ea6-ad61-496e-bad8-765a5236150e.png)
2023-05-08 09:52:29 +00:00
Lukas Wirth
4c5fd19ee5 Render places in capture inlay hints 2023-05-08 09:50:58 +02:00
bors
833d5301d1 Auto merge of #14758 - lumenian:hover-layout-config, r=HKalbasi
Add config for disabling hover memory layout data

Requested in https://github.com/rust-lang/rust-analyzer/pull/14748#issuecomment-1537190252
2023-05-07 16:22:57 +00: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
bors
260e996140 Auto merge of #14733 - azdavis:master, r=matklad
Make line-index a lib, use nohash_hasher

These seem like they are not specific to rust-analyzer and could be pulled out to their own libraries. So I did.

https://github.com/azdavis/millet/issues/31
2023-05-06 23:37:02 +00:00
Yury Ivanou
ecc081d625 Show type alias layout on hover 2023-05-06 16:58:57 +03:00
Ariel Davis
4a1922fd1a Depend on nohash-hasher individually 2023-05-06 00:49:23 -07:00
Lukas Wirth
abcdb4bc7d Fix test fixtures 2023-05-05 14:18:27 +02:00
Lukas Wirth
8081a654da feat: Closure capture inlay hints 2023-05-05 13:38:22 +02:00
bors
0d5773e04e Auto merge of #14725 - HKalbasi:derive-impls, r=HKalbasi
Emit function bodies in expanding builtin derives

fix #14235
2023-05-04 15:01:44 +00:00
hkalbasi
36c9d5ce17 Fix pattern type mismatch in tuples 2023-05-04 16:03:36 +03:30
hkalbasi
d9f4cbbe8f Emit function bodies in expanding builtin derives 2023-05-03 14:14:47 +03:30
Laurențiu Nicola
7197a27028 Use triomphe Arc 2023-05-02 20:02:43 +03:00
Ddystopia
2025f17ac3
Workspace without sysroot could be possible 2023-05-02 17:24:00 +02:00
Ddystopia
4ac39f0c98
Propagating sysroot down + Refactoring 2023-05-02 17:08:56 +02:00
Ddystopia
67e58c5ba6
Add sysroot 2023-05-02 17:08:56 +02:00
Ddystopia
396934860c
Getting cargo workspace from file_id and refactoring 2023-05-02 17:08:56 +02:00
Oleksandr Babak
0913809ac8
Update crates/ide/src/doc_links.rs
Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
2023-05-02 17:08:55 +02:00
Ddystopia
8317c8db1a
Test for Builtin Type 2023-05-02 17:08:55 +02:00
Ddystopia
b64c31c40a
Solve platform-specific issues 2023-05-02 17:06:39 +02:00
Ddystopia
12292e445a
Tests for externalDocs 2023-05-02 17:06:39 +02:00
Ddystopia
2503fbefde
Small improvements and fixes 2023-05-02 17:06:39 +02:00
Ddystopia
3fbb48907e
Add doc strings 2023-05-02 17:06:39 +02:00
Ddystopia
c47a34fddc
Add target_dir path argument for external_docs and other methods 2023-05-02 17:06:38 +02:00
Ddystopia
f2d933ecaf
Add support for local documentation links alongside web documentation links, pending for target_dir path and tests 2023-05-02 17:06:38 +02:00
Bruno Ortiz
66fe84d936 accepting review suggestions 2023-05-02 11:01:41 -03:00
Bruno Ortiz
a3081a6774 Adding crate_root_path to crate_graph 2023-05-02 10:59:31 -03:00
Bruno Ortiz
8e687f7afb improving code to work with multi-workspaces 2023-05-02 10:59:31 -03:00
Bruno Ortiz
1b8288ff96 Fixing naming from graph to list 2023-05-02 10:59:29 -03:00
Bruno Ortiz
e2535926e9 Fixing tests 2023-05-02 10:56:50 -03:00
Bruno Ortiz
09e0a00d36 fetching dependencies from the server 2023-05-02 10:56:09 -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
bors
466b4ec547 Auto merge of #14714 - jhgg:hover/exclude-sized-trait-in-goto-actions, r=Veykril
fix: ide: exclude sized in go-to actions in hover

fixes #13163

i opted to just simply omit `Sized` entirely from go-to actions, as opposed to including it if even someone writes an explicit `T: Sized`, as i think a go-to on Sized is of dubious value practically.
2023-05-02 08:30:17 +00:00
Jake Heinz
3132a9e7fc fix: ide: exclude sized in go-to actions 2023-05-02 08:19:59 +00:00
bors
7d48bbadd4 Auto merge of #14713 - jhgg:fix/do-not-highlight-escapes-in-raw-strings, r=Veykril
fix: ide: do not highlight escapes in raw strings

fixes #14688
2023-05-02 07:39:02 +00:00
Jake Heinz
157069e232 fix: ide: do not highlight escapes in raw strings 2023-05-02 07:16:25 +00:00
Lukas Wirth
5a97a326a9 Simplify 2023-05-02 09:05:28 +02:00
Lukas Wirth
8907533536 Highlight defs in highlight related 2023-05-02 08:59:43 +02:00
Lukas Wirth
a64626d99e Highlight closure captures when cursor is on pipe 2023-05-02 08:59:40 +02: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
Lukas Wirth
e8f5d7620f fix: Fix status command panicking when additional LRU caches are set up 2023-04-25 10:41:05 +02:00
bors
1379b5fac7 Auto merge of #14630 - Veykril:arc, r=Veykril
internal: `Arc<String>` -> `Arc<str>`
2023-04-22 07:58:13 +00:00
Lukas Wirth
f00dcf9a69 internal: Arc<String> -> Arc<str> 2023-04-22 09:48:37 +02:00
bors
11c55b2e27 Auto merge of #14629 - Veykril:stats, r=Veykril
internal: Add some additional status ouput

We should be able to use this infra to get a better grasp about what we might want to LRU
2023-04-22 07:35:29 +00:00
Lukas Wirth
63e3bf118d internal: Add some additional status ouput 2023-04-22 09:34:47 +02:00
Jake Heinz
a497e9a05e mbe: fix token conversion for doc comments 2023-04-22 03:06:06 +00:00
bors
2400b36a2e Auto merge of #14577 - jsoref:spelling, r=lnicola
Spelling

This PR corrects misspellings identified by the [check-spelling action](https://github.com/marketplace/actions/check-spelling).

The misspellings have been reported at https://github.com/jsoref/rust-analyzer/actions/runs/4699991040#summary-12751355796

The action reports that the changes in this PR would make it happy: https://github.com/jsoref/rust-analyzer/actions/runs/4699991284#summary-12751356293

closes #14567
2023-04-19 14:05:40 +00:00
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
hkalbasi
f05f7ab082 Add minicore smoke test 2023-04-18 17:38:38 +03:30
Lukas Wirth
a2a3fecae3 Option begone part 2 2023-04-16 19:20:48 +02:00
Lukas Wirth
96a774261f Option begone part 1 2023-04-16 19:20:42 +02:00
Jonas Schievink
901c8a4259 Map tokens from include! expansion to the included file 2023-04-13 17:41:24 +02:00
Ryo Yoshida
c978d4bf0c
Implement text edits for inlay hints 2023-04-12 19:03:57 +09:00
Ryo Yoshida
fcbc250723
Add field for text edits to InlayHint 2023-04-12 19:03:55 +09: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
c54cb88950 Add bounds for associated types in derive macro 2023-04-07 19:33:14 +03:30
Lukas Wirth
435d585d0c
Revert "Add bounds for fields in derive macro" 2023-04-07 11:01:17 +02:00
hkalbasi
0241b52dad Add bounds for fields in derive macro 2023-04-07 02:21:46 +03:30
bors
e739c999cd Auto merge of #14511 - HKalbasi:dev, r=Veykril
Always reborrow mutable reference receiver in methods

Dependency of #14470
2023-04-06 21:18:15 +00:00
hkalbasi
7ba93cb8cf Always reborrow reference receiver in methods 2023-04-07 00:32:28 +03:30
bvanjoi
f0c74b30ed fix(ide): highlight escapes in char 2023-04-06 23:20:12 +08:00
bors
ea22d245b6 Auto merge of #14499 - DropDemBits:drive-by-fixmes, r=Veykril
minor: Fix some simple FIXMEs

Each FIXME fix has been split into its own commit, since they're all pretty independent changes.

(Forgot to open a PR for this a few days ago, oops)
2023-04-05 20:42:55 +00:00
Lukas Wirth
7f0fbf7f9d Switch crate graph to use an Arena instead of a hashmap 2023-04-05 10:32:02 +02:00
Ryo Yoshida
613e008593
Don't append "!" to non-bang macro name 2023-04-02 20:13:34 +09:00
DropDemBits
0a144f7fff
Use bind by-move to get the parent from the match 2023-03-31 17:48:59 -04:00
Lukas Wirth
b3919ea80d Cleanup crate_graph construction 2023-03-31 14:14:04 +02:00
Lukas Wirth
31db1fc75f internal: Refine CrateOrigin variants 2023-03-31 10:36:13 +02:00
Lukas Wirth
e244942209 internal: Set Durability to HIGH for enable_proc_attr_macros input 2023-03-30 15:11:22 +02:00
bors
fc8c5139fa Auto merge of #14410 - Veykril:query-lru-capacities, r=Veykril
internal: Add config to specifiy lru capacities for all queries

Might help figuring out what queries should be limited by LRU by default, as currently we only limit `parse`, `parse_macro_expansion` and `macro_expand`.
2023-03-30 12:20:24 +00:00
Lukas Wirth
5616d91b73 internal: Add config to specifiy lru capacities for all queries 2023-03-30 12:52:28 +02:00
Lukas Wirth
798990bf33 fix: Add missing autoborrow adjustment for index expressions 2023-03-29 16:11:48 +02:00
Lukas Wirth
d154ea88f9 Split out proc-macros from the CrateGraph 2023-03-25 16:46:44 +01:00
hkalbasi
3303a6eff5 Implement some intrinsics 2023-03-20 21:48:01 +03:30
hkalbasi
eb4939e217 Support overloaded deref MIR lowering 2023-03-17 14:02:55 +03:30
hkalbasi
b7b9ae59a0 desugar ? operator 2023-03-17 13:08:35 +03:30
Lukas Wirth
55120b3d83 Add signature help for tuple struct patterns 2023-03-15 10:17:30 +01:00
Lukas Wirth
03a6ab0b62 Add signature help for record struct patterns 2023-03-14 21:55:03 +01:00
Lukas Wirth
2c364f6e5a Fix tests 2023-03-14 19:55:20 +01:00
Lukas Wirth
228b44cb18 fix: Only skip adjustment hints for block, if and match expressions for reborrows 2023-03-13 16:10:49 +01:00
Lukas Wirth
b6e7cf3201 Highlight unresolved derives as being unresolved 2023-03-08 13:51:14 +01:00
bors
44ff3c407a Auto merge of #14232 - HKalbasi:mir, r=Veykril
MIR episode 2

This PR adds:
1. `need-mut` and `unused-mut` diagnostics
2. `View mir` command which shows MIR for the body under cursor, useful for debugging
3. MIR lowering for or-patterns and for-loops
2023-03-07 09:49:49 +00:00
bors
31c12ec282 Auto merge of #14266 - Veykril:generalize-eager-lazy, r=Veykril
feature: Make replace_or_with_or_else assists more generally applicable
2023-03-06 21:41:46 +00:00
Lukas Wirth
0ce06088f8 Fix inlay-hint tests 2023-03-06 22:39:42 +01:00
Lukas Wirth
199bc82ce8 feature: Make replace_or_with_or_else assists more generally applicable 2023-03-06 22:17:30 +01:00
hkalbasi
ac04bfd7a7 Add View Mir command and fix some bugs 2023-03-06 21:09:09 +03:30
hkalbasi
61ad6a96ad Add BindingId 2023-03-06 21:09:08 +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
6756294aa0 Auto merge of #14184 - lowr:feat/trait-alias-def, r=Veykril
Handle trait alias definitions

Part of #2773

This PR adds a bunch of structs and enum variants for trait aliases. Trait aliases should be handled as an independent item because they are semantically distinct from traits.

I basically started by adding `TraitAlias{Id, Loc}` to `hir_def::item_tree` and iterated adding necessary stuffs until compiler stopped complaining what's missing. Let me know if there's still anything I need to add.

I'm opening up this PR for early review and stuff. I'm planning to add tests for IDE functionalities in this PR, but not type-related support, for which I put FIXME notes.
2023-03-03 15:45:18 +00:00
Ryo Yoshida
f8eac19b33
Support trait aliases in IDE where type support isn't needed 2023-03-04 00:24:08 +09:00
Ryo Yoshida
29c957f973
Lower and handle trait aliases in HIR 2023-03-04 00:24:07 +09:00
Lukas Wirth
ec273c3d12 Split pattern inference into more functions 2023-03-03 10:42:46 +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
bors
c386316fe0 Auto merge of #14185 - anergictcell:fix_14142, r=HKalbasi
Fix: Run doctests for structs with lifetime parameters from IDE

Fixes #14142: Doctests can't be triggered for structs with lifetimes

This MR adds lifetime parameters to the structs path for runnables so that they can be triggered from an IDE as well.

This is my first MR for rust-analyzer, please let me know if I should change something, either in code or the description here.
2023-02-28 09:52:03 +00:00
Jonas Marcello
af79491ae6 Rename method to generic_parameters 2023-02-28 10:32:42 +01:00
bors
a0be16b0b2 Auto merge of #14040 - HKalbasi:mir, r=HKalbasi
Beginning of MIR

This pull request introduces the initial implementation of MIR lowering and interpreting in Rust Analyzer.

The implementation of MIR has potential to bring several benefits:
- Executing a unit test without compiling it: This is my main goal. It can be useful for quickly testing code changes and print-debugging unit tests without the need for a full compilation (ideally in almost zero time, similar to languages like python and js). There is a probability that it goes nowhere, it might become slower than rustc, or it might need some unreasonable amount of memory, or we may fail to support a common pattern/function that make it unusable for most of the codes.
- Constant evaluation: MIR allows for easier and more correct constant evaluation, on par with rustc. If r-a wants to fully support the type system, it needs full const eval, which means arbitrary code execution, which needs MIR or something similar.
- Supporting more diagnostics: MIR can be used to detect errors, most famously borrow checker and lifetime errors,  but also mutability errors and uninitialized variables, which can be difficult/impossible to detect in HIR.
- Lowering closures: With MIR we can find out closure capture modes, which is useful in detecting if a closure implements the `FnMut` or `Fn` traits, and calculating its size and data layout.

But the current PR implements no diagnostics and doesn't support closures. About const eval, I removed the old const eval code and it now uses the mir interpreter. Everything that is supported in stable rustc is either implemented or is super easy to implement. About interpreting unit tests, I added an experimental config, disabled by default, that shows a `pass` or `fail` on hover of unit tests (ideally it should be a button similar to `Run test` button, but I didn't figured out how to add them). Currently, no real world test works, due to missing features including closures, heap allocation, `dyn Trait` and ... so at this point it is only useful for me selecting what to implement next.

The implementation of MIR is based on the design of rustc, the data structures are almost copy paste (so it should be easy to migrate it to a possible future stable-mir), but the lowering and interpreting code is from me.
2023-02-28 09:12:19 +00:00
hkalbasi
cd67589f63 beginning of MIR 2023-02-27 23:45:54 +03:30
Jonas Marcello
f494d1199d Remove empty line 2023-02-27 18:10:20 +01:00
Jonas Marcello
7abcc7d862 Add const to doctest runnable definition
Refactor method to get type parameters to add const parameters
Remove unused methods
2023-02-27 18:08:20 +01:00
Jonas Marcello
4ee2e469a2 Rename the method that returns struct paramaters 2023-02-27 18:08:20 +01:00
Jonas Marcello
9957bb361d Add const generics to doctest names for structt 2023-02-27 18:08:20 +01:00
Jonas Marcello
8bc75c4c28 return Iterator instead of Vec for combined lifetime and argument parameters 2023-02-27 18:08:20 +01:00
Jonas Marcello
9942cc425b Fix 14142: Annotate lifetime paramaters in doctest runnables 2023-02-27 18:08:17 +01:00
bors
2e479158bb Auto merge of #14208 - Kohei316:master, r=Veykril
fix:add a case in which remainig is None in resolveing types when resolving hir path.

fix #14030 The variable type is being determined incorrectly
This PR fixed a problem in which `go to definition` is jumping to the incorrect position because it was failing to resolve the type in case it defined in the module when resolving hir.
In addition, I added a test for this issue and refactored the related code.
This is my first PR and I am using a translation tool to write this text. Let me know if you have any problems.
2023-02-27 08:40:39 +00:00
morine0122
aa877645a6 Fix resolving types when resolving HIR and add a related test 2023-02-26 21:50:39 +09:00
jmviz
dd92e4a507 add to manual 2023-02-20 11:38:33 -05:00
Ryo Yoshida
d4166234ef
Adjust block-local impl item visibility rendering 2023-02-20 00:44:51 +09:00
bors
1f2d33fb40 Auto merge of #14160 - Veykril:hover-call, r=Veykril
fix: Bring back hovering call parens for return type info
2023-02-15 17:59:31 +00:00
Lukas Wirth
e550e553e0 fix: Bring back hovering call parens for return type info 2023-02-15 18:58:59 +01:00
Lukas Wirth
5859190066 Adjust binding mode inlay hints to render better with @ patterns 2023-02-15 14:47:02 +01:00
Lukas Wirth
3c0f20a7bd internal: Enable smallvec's union feature 2023-02-14 17:01:01 +01:00
bors
44568007d1 Auto merge of #14128 - Veykril:parser, r=Veykril
internal: Improve parser recovery for delimited lists

Closes https://github.com/rust-lang/rust-analyzer/issues/11188, https://github.com/rust-lang/rust-analyzer/issues/10410, https://github.com/rust-lang/rust-analyzer/issues/10173

Should probably be merged after the stable release as this might get the parser stuck if I missed something
2023-02-14 12:59:39 +00:00
Lukas Wirth
4f6b5f41d4 Recover better for more delimited sequences 2023-02-14 13:52:15 +01:00
bors
88b3d9f6f4 Auto merge of #14144 - lowr:fix/find-occurrence-of-raw-ident, r=Veykril
fix: Search raw identifiers without prefix

When we find references/usages of a raw identifier, we should disregard `r#` prefix because there are keywords one can use without the prefix in earlier editions (see #13034; this bug is actually fallout from the PR). `name`, the text we're searching for, has already been stripped of the prefix, but the text of nodes we compare it to hasn't been.

The second commit is strictly refactoring, I can remove it if it's not much of value.
2023-02-14 11:15:55 +00:00
Ryo Yoshida
098d9d77b4
Search raw identifiers without prefix 2023-02-14 17:34:14 +09:00
Aleksey Kladov
0da27376cf Support UTF-32 position encoding
Looks like this is a native encoding for Emacs at least!
2023-02-14 01:09:50 +00:00
Lukas Wirth
244a48d13d Cleanup signature help a bit 2023-02-13 11:25:45 +01:00
Ryo Yoshida
57f0e9c100
Disallow invalid raw ident names 2023-02-13 18:45:19 +09:00
Ryo Yoshida
9b0daf20c9
fix: don't include r# prefix in filesystem changes 2023-02-13 18:44:53 +09:00
Lukas Wirth
9738f97f8c Fix active parameter analysis once more 2023-02-12 17:32:11 +01:00
Lukas Wirth
5fdf640fb3 fix: Fix bind pat inlay hints rendering for constant patterns 2023-02-11 16:29:54 +01:00
Lukas Wirth
557aa1e378 Render discriminant inlay hints for mixed variants if at least one discriminant is specified 2023-02-10 09:57:03 +01:00
Lukas Wirth
5e6208b1df fix: Don't insert a semicolon when typing = if parse errors are encountered 2023-02-08 12:06:35 +01:00
bors
b7836e44d3 Auto merge of #14099 - Veykril:inlay-hint-loc, r=Veykril
Properly use location links for type hints of impl Future and its assoc type
2023-02-08 08:43:10 +00:00