hkalbasi
36c9d5ce17
Fix pattern type mismatch in tuples
2023-05-04 16:03:36 +03:30
hkalbasi
6312fbf521
MIR episode 4
2023-05-01 23:23:10 +03:30
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
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
hkalbasi
59b6f2d9f2
Compute closure captures
2023-04-10 23:04:34 +03:30
hkalbasi
7ba93cb8cf
Always reborrow reference receiver in methods
2023-04-07 00:32:28 +03:30
Lukas Wirth
798990bf33
fix: Add missing autoborrow adjustment for index expressions
2023-03-29 16:11:48 +02:00
hkalbasi
eb4939e217
Support overloaded deref MIR lowering
2023-03-17 14:02:55 +03:30
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
0ce06088f8
Fix inlay-hint tests
2023-03-06 22:39:42 +01:00
Lukas Wirth
ec273c3d12
Split pattern inference into more functions
2023-03-03 10:42:46 +01:00
hkalbasi
cd67589f63
beginning of MIR
2023-02-27 23:45:54 +03:30
Lukas Wirth
5859190066
Adjust binding mode inlay hints to render better with @ patterns
2023-02-15 14:47:02 +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
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
Lukas Wirth
2b4a5374ee
Properly use location links for type hints of impl Future and its assoc type
2023-02-07 22:42:03 +01:00
Lukas Wirth
c6305c5659
fix: Don't panic on broken syntax trees in adjustment inlay hints
2023-02-06 12:38:57 +01:00
bors
7acc434f46
Auto merge of #14071 - Veykril:inlay-hints, r=Veykril
...
fix: Don't render fieldless discriminant inlay hints for datacarrying enums
2023-02-01 10:39:15 +00:00
Lukas Wirth
14f19c73e9
fix: Don't render fieldless discriminant inlay hints for datacarrying enums
2023-02-01 11:38:39 +01:00
Lukas Wirth
4ff6f3845f
Update ide test outputs
2023-01-27 11:40:44 +01:00
Lukas Wirth
3a95864df5
Unconditionally enable location links in inlay hints again
2023-01-16 16:04:38 +01:00
Maybe Waffle
81d7e302ed
Add basic tooltips to adjustment hints
2023-01-16 12:44:39 +00:00
Lukas Wirth
27ba598dfe
Make inlay hint location links work for more types
2023-01-14 13:30:56 +01:00
Lukas Wirth
f2444b2a40
Remove unnecessary Hint suffix on InlayKind variants
2023-01-14 13:08:45 +01:00
Lukas Wirth
60075a6625
Remove hover inlay tooltips, replace them with location links
2023-01-14 12:19:29 +01:00
Lukas Wirth
aafb0f1f8d
Use smallvec for inlay-hint parts
2023-01-13 15:03:37 +01:00
Maybe Waffle
b6169c2a2e
Add a fixme to remove hacks
2023-01-09 13:37:37 +00:00
Maybe Waffle
a9676cfbe3
Add a "bug" test for adjustment hints to check for status quo
2023-01-09 13:35:21 +00:00
Maybe Waffle
12b7f9f7bf
Add an option to minimize parentheses for adjustment hints
2023-01-09 13:35:17 +00:00
Maybe Waffle
b89c4f0a05
Implement postfix adjustment hints
...
I'd say "First stab at implementing..." but I've been working on this
for a month already lol
2023-01-09 13:27:59 +00:00
bors
f77b68a3cb
Auto merge of #13860 - danieleades:clippy, r=lnicola
...
fix a bunch of clippy lints
fixes a bunch of clippy lints for fun and profit
i'm aware of this repo's position on clippy. The changes are split into separate commits so they can be reviewed separately
2023-01-08 17:29:57 +00:00
Lukas Wirth
b996a54cd8
Skip lifetime elision on fn pointers and fn trait types
2023-01-03 11:58:31 +01:00
Lukas Wirth
506895fa2f
Fix spelling mistake
2023-01-02 23:16:26 +01:00
Daniel Eades
cc80c5bd07
remove unnecessary lazy evaluations
2023-01-02 15:02:54 +00:00
Daniel Eades
ed128872eb
remove needless borrows
2023-01-02 14:52:32 +00:00
bors
17cc78f169
Auto merge of #13832 - Veykril:discriminant-hints, r=Veykril
...
Enum variant discriminants hints

2023-01-02 13:20:33 +00:00
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
Lukas Wirth
df8fc78ece
Enum variant discriminants hints
2022-12-23 11:37:42 +01:00
Yuri Astrakhan
e341e996f7
Clippy-fix explicit auto-deref
...
Seems like these can be safely fixed. With one, I was particularly
surprised -- `Some(pats) => &**pats,` in body.rs?
```
cargo clippy --fix -- -A clippy::all -D clippy::explicit_auto_deref
```
2022-12-23 02:52:14 -05:00
Yuri Astrakhan
1d59c7b667
Remove non-needed clones
...
I am not certain if this will improve performance,
but it seems having a .clone() without any need should be removed.
This was done with clippy, and manually reviewed:
```
cargo clippy --fix -- -A clippy::all -D clippy::redundant_clone
```
2022-12-23 02:20:03 -05:00
bors
a06525517b
Auto merge of #13820 - Veykril:or-pat-bm-fix, r=Veykril
...
Fix binding mode hints always adding parentheses to or-patterns
2022-12-22 23:02:19 +00:00
Maybe Waffle
ef4c8167e8
Pass FamousDefs
around in inlay hints
2022-12-22 11:00:25 +00:00
bors
eb3963b22e
Auto merge of #13817 - WaffleLapkin:hide_adjustment_hints_outside_of_unsafe, r=Veykril
...
feat: Add an option to hide adjustment hints outside of `unsafe` blocks and functions
As the title suggests: this PR adds an option (namely `rust-analyzer.inlayHints.expressionAdjustmentHints.hideOutsideUnsafe`) that allows to hide adjustment hints outside of `unsafe` blocks and functions:

Requested by `@BoxyUwU` <3
2022-12-22 09:37:00 +00:00
Lukas Wirth
b9341e2fe6
Fix binding mode hints always adding parentheses to or-patterns
2022-12-22 10:35:35 +01:00
Waffle Maybe
1038db5f1d
Apply suggestions from code review
...
Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
2022-12-21 23:00:12 +00:00