Lukas Wirth
f8ed4d7ae4
Use lang item resolution instead of known paths
2023-01-21 19:03:36 +01:00
Lukas Wirth
1535881836
Replace SmolStr usage with lang item enum for lang items
2023-01-21 17:55:45 +01:00
bors
1afa032f34
Auto merge of #13996 - lnicola:bump-deps, r=lnicola
...
minor: Bump deps
2023-01-21 12:27:40 +00:00
Laurențiu Nicola
8f678a0169
Bump snap
2023-01-21 14:05:22 +02:00
Laurențiu Nicola
1431264646
Bump rayon
2023-01-21 14:05:22 +02:00
Laurențiu Nicola
25a5bd9b13
Bump object
2023-01-21 14:05:22 +02:00
Laurențiu Nicola
f2397638f5
Bump arbitrary and derive-arbitrary
2023-01-21 14:05:22 +02:00
Laurențiu Nicola
d26c8ccc89
Bump num_cpus
2023-01-21 08:49:50 +02:00
Laurențiu Nicola
392a6ee422
Bump once_cell
2023-01-21 08:48:46 +02:00
bors
303737dad7
Auto merge of #13989 - Veykril:hover, r=Veykril
...
internal: Remove hover fallback in favor of ranged hover
The fallback is usually more annoying than useful at this point (it messes with the range of diagnostic popups a lot), we now have a ranged hover to check the type of something which works a lot better.
Closes https://github.com/rust-lang/rust-analyzer/issues/11602
2023-01-20 22:00:22 +00: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
bors
ce67dea2ac
Auto merge of #13988 - Veykril:hover-no-markdown, r=Veykril
...
Fix markdown removal in hover handling whitespace weirdly
Fixes https://github.com/rust-lang/rust-analyzer/issues/10028
2023-01-20 15:23:54 +00:00
Lukas Wirth
c5b1e3f2ae
Fix markdown removal in hover handling whitespace weirdly
2023-01-20 14:29:12 +01:00
bors
d46d012c38
Auto merge of #13978 - bvanjoi:array-match, r=Veykril
...
feat: array match
fixed https://github.com/rust-lang/rust-analyzer/issues/13970
2023-01-20 10:30:18 +00:00
bvanjoi
8fa69f9f7d
feat: array match
2023-01-20 10:59:30 +08:00
bors
6e52c64031
Auto merge of #13985 - Veykril:content-modified, r=Veykril
...
Don't respond with a ContentModified while loading the workspace
Initially this was done to prevent frequent inlay hint flickering, but this causes a lot of problems for a bunch of clients. We can (and already kind of have) move this into the semantic token request handlers instead.
Fixes https://github.com/rust-lang/rust-analyzer/issues/10910
2023-01-19 21:00:26 +00:00
Lukas Wirth
7385467f2e
Don't respond with a ContentModified while loading the workspace
2023-01-19 21:52:27 +01:00
bors
56fb0cad6d
Auto merge of #13984 - Veykril:target-data-layout, r=Veykril
...
fix: Fix target-data-layout fetching incorrectly passing 'rustc' to rustc
2023-01-19 20:45:29 +00:00
Lukas Wirth
384fa4b84a
fix: Fix target-data-layout fetching incorrectly passing 'rustc' to rustc
2023-01-19 21:31:08 +01:00
onestacked
872408500b
Parse const_closures syntax.
...
Enables parsing of the syntax for `#![features(const_closures)]` introduced in https://github.com/rust-lang/rust/pull/106004
2023-01-19 15:40:07 +01:00
Lukas Wirth
c9d33cddc9
Don't run flycheck on startup unless checkOnSave is enabled
2023-01-18 21:38:30 +01:00
Lukas Wirth
1e4a182954
Fix checkOnSave to check config patching not always working
2023-01-18 20:29:55 +01:00
Laurențiu Nicola
210757769d
Fix replace_arith label
2023-01-17 16:31:34 +02:00
Ryo Yoshida
c53064fb58
Enforce builtin binop expectations even without lang items
2023-01-17 20:17:15 +09:00
Ryo Yoshida
461435adab
Enforce builtin binop expectations on single references
...
Also don't enforce them on non-builtin types
2023-01-17 20:17:09 +09:00
bors
fa874627f0
Auto merge of #13969 - Veykril:workspace.dependencies, r=Veykril
...
Use workspace.dependencies to declare local dependencies
2023-01-17 10:29:27 +00:00
bors
62907858d5
Auto merge of #13964 - Veykril:workspace.package, r=Veykril
...
Specify authors, edition, license and rust-versian via workspace.package
2023-01-17 10:13:24 +00:00
Lukas Wirth
bed4db3c62
Use workspace.dependencies to declare local dependencies
2023-01-17 10:52:26 +01:00
bors
e11c0e3e85
Auto merge of #13966 - HKalbasi:layout, r=Veykril
...
Don't compute layout if `TargetDataLayout` is not available
2023-01-17 09:39:32 +00:00
hkalbasi
ec65b3b3aa
fix tests
2023-01-16 23:45:12 +03:30
hkalbasi
77efa0267d
Don't compute layout if TargetDataLayout
is not available
2023-01-16 22:43:27 +03:30
bors
455ef0c806
Auto merge of #13935 - ModProg:assist_desugar_doc_comment, r=Veykril
...
Assist: desugar doc-comment
My need for this arose due to wanting to do feature dependent documentation and therefor convert parts of my doc-comments to attributes.
Not sure about the pub-making of the other handlers functions, but I didn't think it made much sense to reimplement them.
2023-01-16 19:11:19 +00:00
Roland Fredenhagen
ec06313a6d
fix test for required_hashes
2023-01-16 19:25:30 +01:00
Roland Fredenhagen
5e66e49c73
move required_hashes into utils
2023-01-16 18:39:16 +01:00
Lukas Wirth
e4858fe480
Specify authors, edition and license via workspace.package
2023-01-16 16:44:00 +01:00
Lukas Wirth
679df2adf1
Specify rust-version via workspace.package
2023-01-16 16:33:01 +01:00
Lukas Wirth
3a95864df5
Unconditionally enable location links in inlay hints again
2023-01-16 16:04:38 +01:00
bors
5306eb06cc
Auto merge of #13947 - WaffleLapkin:adjustment_hint_tooltips, r=Veykril
...
Add basic tooltips to adjustment hints
![2023-01-16_16-45](https://user-images.githubusercontent.com/38225716/212681383-a60b60bb-a8e7-410d-8b24-f6b72c197311.png )
I'm not sure how to make them look nicer, but it's at least something.
2023-01-16 13:11:16 +00:00
Maybe Waffle
81d7e302ed
Add basic tooltips to adjustment hints
2023-01-16 12:44:39 +00:00
Ryo Yoshida
fc56cacfc1
Test TraitRef
equality before generating missing impl method body
2023-01-16 20:55:56 +09:00
Ryo Yoshida
8afaaa54b0
Add TraitRef
for HIR
2023-01-16 20:55:51 +09:00
Niels Sascha Reedijk
8aa1d2d789
Update command-group from 1.0.8 to 2.0.1
...
With #13552 the depencency of on the command-group crate was introduced, which also
introduced a dependency on nix. That version of nix does not build on Haiku. This
change introduces a newer version of command-group, which also updates nix from
0.22.3 to 0.26.1, which is compatible on Haiku.
2023-01-15 08:20:25 +00:00
Maybe Waffle
a7787533af
Use the fact that Either
: AstNode
2023-01-14 15:20:32 +00:00
bors
c78b9f0068
Auto merge of #13949 - WaffleLapkin:either_ast_node, r=Veykril
...
minor: implement `AstNode` for `Either`
Makes code a little bit nicer
2023-01-14 13:50:11 +00:00
bors
ce86f12e8d
Auto merge of #13945 - bvanjoi:orpat-match, r=lnicola
...
fix: check orpat in missing match
fixed #13942
2023-01-14 13:37:30 +00:00
bors
8800ea6461
Auto merge of #13950 - WaffleLapkin:iterate_over_arrays_directly, r=Veykril
...
minor: Iterate over arrays dirrectly, instead of going through a slice
Minor code improvement.
2023-01-14 13:08:36 +00:00
Maybe Waffle
bd04416aaa
Iterate over arrays dirrectly, instead of going through a slice
2023-01-14 13:02:28 +00:00
bors
6673e515b7
Auto merge of #13948 - Veykril:inlay-hints, r=Veykril
...
Make inlay hint location links work for more types
2023-01-14 12:50:26 +00:00
Maybe Waffle
cfc01150bf
implement AstNode
for Either
2023-01-14 12:45:20 +00:00
Lukas Wirth
27ba598dfe
Make inlay hint location links work for more types
2023-01-14 13:30:56 +01:00
bors
ce6955c10e
Auto merge of #13946 - Veykril:inlay-hints, r=Veykril
...
Remove hover inlay tooltips, replace them with location links
Turns out we re-implemented what clients can already figure out through the use of location-links. We might want lazy resolves tooltips later on still, but for now this simplifies things again.
2023-01-14 12:22:43 +00: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
bvanjoi
e9724e55df
fix: check orpat in missing match
2023-01-14 18:54:45 +08:00
bors
32be158630
Auto merge of #13941 - matklad:rpj, r=Veykril
...
internal: explain the idea behind rust-project.json
2023-01-14 09:40:40 +00:00
Lukas Wirth
aafb0f1f8d
Use smallvec for inlay-hint parts
2023-01-13 15:03:37 +01:00
bors
a119352ada
Auto merge of #13937 - danieleades:recursive-display, r=lnicola
...
remove recursive 'Display' implementations
closes #13920
`@lnicola` is this the solution you were looking for?
having explicitly unimplemented methods seems preferable to apparently implemented methods that can't be called
2023-01-13 12:07:28 +00:00
Alex Kladov
bd350085f6
Update crates/project-model/src/project_json.rs
...
Co-authored-by: Laurențiu Nicola <lnicola@users.noreply.github.com>
2023-01-13 12:01:04 +00:00
Alex Kladov
87315ef5c3
Apply suggestions from code review
...
Co-authored-by: Laurențiu Nicola <lnicola@users.noreply.github.com>
2023-01-13 11:57:02 +00:00
bors
15fb082cc1
Auto merge of #13753 - kdy1:limit, r=lnicola
...
fix: Increase token limit of proc macro
Fixes #13738
[The swc project](https://swc.rs ) has lots of type definitions, and the current limit is too low for the ECMAScript/CSS visitors.
[rustdoc](https://rustdoc.swc.rs/swc_ecma_visit )
---
With this fix, the rust-analyzer shows trait-related actions.
<img width="1840" alt="image" src="https://user-images.githubusercontent.com/29931815/206839269-d7a04589-7dba-449b-ad0b-1f69d52bd039.png ">
2023-01-13 11:45:50 +00:00
Aleksey Kladov
aa73366b0b
internal: explain the idea behind rust-project.json
2023-01-13 11:44:02 +00:00
bors
cdbe025232
Auto merge of #13922 - danieleades:loop-that-never-loops, r=lnicola
...
minor: loop-that-never-loops
closes #13921
2023-01-13 11:23:51 +00:00
Neel Yadav
9721505bf1
Fix panicking Option unwraping in match arm analysis
2023-01-12 22:33:58 -06:00
bors
fb39efe26c
Auto merge of #13934 - Veykril:unlinked-file-inline-modules, r=Veykril
...
feat: Make unlinked_file diagnostic quickfixes work for inline modules
Finally got myself to fix this, bothered me quite a bit that this never worked
![Code_Qe3WlMvt5Q](https://user-images.githubusercontent.com/3757771/211927799-023e48ee-7cdd-4dd7-8e25-a23eddc7d897.gif )
(Just gotta fix up the indentation still)
2023-01-12 15:25:12 +00:00
Daniel Eades
c4b36b64aa
remove recursive 'Display' implementations
2023-01-12 11:53:45 +00:00
Daniel Eades
7413a9954f
interior-mutable types should be 'static' rather than 'const
2023-01-12 10:48:10 +00:00
Lukas Wirth
14777ce751
fix indentation of unlinked_file quickfix
2023-01-12 11:24:44 +01:00
Roland Fredenhagen
03bc46f96b
Convert pub to pub(crate)
2023-01-12 09:54:48 +01:00
Roland Fredenhagen
6f201cfc56
Assist: desugar doc-comment
2023-01-12 02:28:13 +01:00
Lukas Wirth
5214a98d9c
Simplify
2023-01-11 23:04:35 +01:00
Lukas Wirth
1ce3e820dc
feat: Make unlinked_file diagnostic quickfixes work for inline modules
2023-01-11 22:39:05 +01:00
Lukas Wirth
bb4e272d8a
Refine search for const and function assoc items
2023-01-11 17:10:04 +01:00
daniel.eades
a3114c3697
move loop index inside iterator
2023-01-11 16:07:35 +00:00
bors
f32f64bffc
Auto merge of #13929 - danieleades:simplify, r=lnicola
...
internal: a number of code simplifications
2023-01-11 09:38:34 +00:00
bors
75877d78d9
Auto merge of #13897 - bvanjoi:nearest-block-search, r=Veykril
...
fix(ty): should query impls in nearest block
fix https://github.com/rust-lang/rust-analyzer/issues/13895
2023-01-10 22:44:29 +00:00
Daniel Eades
d218b237fd
collapse some nested blocks
2023-01-10 20:40:08 +00:00
Daniel Eades
95fc3ba41c
fixup
2023-01-10 19:51:21 +00:00
Daniel Eades
5b1cd8245f
fixup
2023-01-10 19:44:19 +00:00
Daniel Eades
ac3844a0bb
a number of code simplifications
2023-01-10 18:48:51 +00:00
Daniel Eades
95d14c393c
avoid 'cloning' types that implement 'Copy'
2023-01-10 18:20:12 +00:00
bors
3987c835f2
Auto merge of #13919 - danieleades:derive-hash, r=lnicola
...
derive 'Hash'
2023-01-10 17:48:46 +00:00
bors
c3b78f440e
Auto merge of #13917 - Veykril:raw-attrs, r=Veykril
...
Split out hir-def attribute handling parts into hir-expand
This should help with `cfg_attr` handling for macro inputs
2023-01-10 17:35:37 +00:00
Daniel Eades
6153ea8dce
loop-that-never-loops
2023-01-10 08:28:28 +00:00
Daniel Eades
56ffe63c3c
derive 'Hash'
2023-01-10 07:18:17 +00:00
Daniel Eades
db41e6b408
remove 'deny_clippy' test
2023-01-10 07:16:27 +00:00
Daniel Eades
b971b5b64f
suppress lint
2023-01-10 07:06:26 +00:00
Daniel Eades
ef4debc8b1
comment out disabled code
2023-01-10 07:02:04 +00:00
bvanjoi
9a15cc81b4
fix(ty): should query impls in nearest block
2023-01-10 10:28:17 +08:00
Lukas Wirth
621e96bd6a
Encode one level of cfg_attr in attr_id
2023-01-09 21:06:13 +01:00
Lukas Wirth
68723043db
Split out hir-def attribute handling parts into hir-expand
2023-01-09 19:29:28 +01:00
Ian Chamberlain
65cf7abbe2
Use experimental capability to enable color codes
2023-01-09 11:50:35 -05:00
Ian Chamberlain
c3e4bc3136
Update docs to include note about ANSI diagnostics
2023-01-09 11:49:58 -05:00
Ian Chamberlain
40207906f4
Default to use colored ANSI diagnostics
2023-01-09 11:46:29 -05:00
bors
fd300eebc9
Auto merge of #13799 - Veykril:flycheck, r=Veykril
...
Rename `checkOnSave` settings to `check`
Now that flychecks can be triggered without saving the setting name doesn't make that much sense anymore. This PR renames it to just `check`, but keeps `checkOnSave` as the enabling setting.
2023-01-09 15:35:38 +00:00
bors
f920b03c6c
Auto merge of #13914 - WaffleLapkin:qualify_method_call_rewrite, r=lnicola
...
minor: Make `qualify_method_call` `RefactorRewrite`
See https://github.com/rust-lang/rust-analyzer/pull/13825#issuecomment-1363289767
2023-01-09 15:22:51 +00:00
bors
e125bee055
Auto merge of #13890 - lowr:fix/unescape-inline-mod-name, r=Veykril
...
fix: unescape inline module names in module resolution
Fixes #13884
2023-01-09 15:07:06 +00:00
bors
ba204ef07b
Auto merge of #13863 - danieleades:approx-constant, r=Veykril
...
minor: suppress 'clippy::approx_constant' lint in test case
suppresses a false positive clippy lint
2023-01-09 14:53:46 +00:00
bors
d33fa38cc9
Auto merge of #13825 - WaffleLapkin:ufcs_to_method_call_and_back, r=Veykril
...
feat: Add `unqualify_method_call` assist
...which is the inverse of `qualify_method_call` assist.
![Peek 2022-12-22 22-47](https://user-images.githubusercontent.com/38225716/209206554-8f067206-6fa6-48f8-849e-f6d36ee2e5a1.gif )
Optional future work:
- import the trait if needed
- remove excess references when auto-ref is possible
2023-01-09 14:37:40 +00:00
Maybe Waffle
bdaad9eb15
Make qualify_method_call
RefactorRewrite
2023-01-09 14:26:48 +00:00