Commit Graph

25699 Commits

Author SHA1 Message Date
bors
4a2ceeff0f Auto merge of #15135 - HKalbasi:mir, r=HKalbasi
Fix some unsizing problems in mir
2023-06-25 22:28:23 +00:00
hkalbasi
6d2d1387af Fix some unsizing problems in mir 2023-06-26 01:57:12 +03:30
bors
b092b45484 Auto merge of #15126 - cuviper:indexmap-2, r=lnicola
Upgrade to indexmap v2

No code changes required.
2023-06-25 05:37:30 +00:00
Josh Stone
380773b3e8 Upgrade to indexmap v2 2023-06-24 17:35:20 -07:00
Raghul Nanth A
506153b9f3 refactor(workflow): Use build matrix 2023-06-24 23:35:35 +05:30
Raghul Nanth A
68e64025fd fix(name): Push to rust-analyzer metrics repo 2023-06-24 22:33:33 +05:30
Ryo Yoshida
d026479ba6
Support #[rustc_coinductive] 2023-06-25 00:13:31 +09:00
bors
6ba2590541 Auto merge of #15120 - lnicola:neovim, r=lnicola
minor: Neovim, not NeoVim
2023-06-23 18:01:49 +00:00
Laurențiu Nicola
8589a8100a Neovim, not NeoVim 2023-06-23 20:00:53 +02:00
bors
06b99d46d0 Auto merge of #15119 - HKalbasi:mir, r=HKalbasi
Support more intrinsics in mir interpreter

Increases passed tests on self from 49 to 52
2023-06-23 17:38:23 +00:00
hkalbasi
5eb4796d3d Support more intrinsics in mir interpreter 2023-06-23 21:08:05 +03:30
Ali Bektas
b96796ce5e Minor changes. Add resolve_resource_op() 2023-06-23 19:22:59 +02:00
Alex Kirszenberg
5991f0d869 Follow raw pointers in autoderef chain when resolving methods with custom receiver 2023-06-23 15:35:41 +02:00
bors
246d11b2a5 Auto merge of #15116 - Veykril:remove-markdown-injection, r=Veykril
Remove markdown injection again

I really tried to make this work, but this stuff is so underdocumented and basically none of the regex options worked for me (not `match`, nor using `begin` and `end` pairs), VSCode basically doesn't help you out at all as it doesn't ever seem to report errors even when debugging an extension, so at this point I'm inclined to just remove this again, as it is only causing issues.

Closes https://github.com/rust-lang/rust-analyzer/issues/15114
Closes https://github.com/rust-lang/rust-analyzer/issues/15111
2023-06-23 09:36:41 +00:00
Lukas Wirth
0141a6b65c Remove markdown injection 2023-06-23 11:31:10 +02:00
bors
403433a355 Auto merge of #15112 - HKalbasi:mir, r=HKalbasi
Support manual impl of fn traits in mir interpreter

Increases passed tests from 48 to 49 :)
2023-06-22 18:54:45 +00:00
hkalbasi
99a4f2e983 Support manual impl of fn traits in mir interpreter 2023-06-22 22:24:21 +03:30
Ali Bektas
96cebca116 Version 2 2023-06-22 20:29:11 +02:00
bors
3a4f9a1416 Auto merge of #15110 - HKalbasi:run-test-command, r=HKalbasi
internal: Add run-tests command

This command is similar to `cargo test` except that it uses r-a to run tests instead of compiling and running them with rustc. This is slower than `cargo test` and it is only useful for me to see a bird view of what needs to be fixed. The current output is:
```
48 passed, 5028 failed, 2 ignored
All tests            174.74s, 648ginstr
```
48 is very low, but higher than what I originally thought.

Now that there is some passing tests, I can show the plan:

https://github.com/rust-lang/rust-analyzer/assets/45197576/76d7d777-1843-4ca4-b7fe-e463bdade6cb

That is, at the end, I want to be able to immediately re run every test after every change. (0.5s is not really immediate, but it's not finished yet, and it is way better than 8s that running a typical test in r-a will take on my system)
2023-06-22 16:04:16 +00:00
hkalbasi
674cd5ab57 Add run-tests command 2023-06-22 19:33:37 +03:30
bors
6c73f67998 Auto merge of #15105 - dfireBird:fix-15096, r=HKalbasi
Change comparsion for checking if number is negative to include 128

The last byte in Little-Endian representation of negative integers start at 128 (Ox80) till 255 (OxFF). The comparison before the fix didn't check for 128 which made is_negative variable as false.

Potentially fixes #15096
2023-06-22 12:35:22 +00:00
dfireBird
410ede9101
Add some tests in number evaluvation and hover to prevent regression
Added a test near positive extermes and two test near negative
extermes as well one for 0.
Added a test using the `as` cast and one with comparison with 0.
2023-06-22 17:58:12 +05:30
bors
f0e00ed599 Auto merge of #14948 - alibektas:14386, r=Veykril
feature : assist delegate impl

This PR ( fixes #14386 ) introduces a new IDE assist that generates a trait impl for a struct that delegates a field. This is a draft because the current `ide_db::path_transform::PathTransform` produces some unwanted results when it deals with extern crates, an example of which I attach as a GIF.

GIFs :
1. A general case
![14386-functional](https://github.com/rust-lang/rust-analyzer/assets/20956650/22114959-caa6-45ec-a154-b4b2f458f6b1)

2. A case where `ide_db::path_transform::PathTransform` fails to correctly resolve a property ( take `Allocator` as an example ) to its full path, thus causing an error to occur. ( Not to even mention that resolving this causes another error `use of unstable library feature 'allocator_api'` to occur
![14386-erroneous](https://github.com/rust-lang/rust-analyzer/assets/20956650/922ca715-594e-4168-a579-7c5c006f93aa)
2023-06-22 10:44:01 +00:00
bors
00221c5026 Auto merge of #15077 - Veykril:dep-updates, r=Veykril
Bump deps

Closes https://github.com/rust-lang/rust-analyzer/issues/15107
2023-06-22 10:18:16 +00:00
Lukas Wirth
e5c65071bc Disconnect library crate dependencies from workspace dependencies 2023-06-22 11:50:52 +02:00
Lukas Wirth
0953e85b59 Downgrade some deps to get rif of windows-sys duplication 2023-06-22 11:44:10 +02:00
Lukas Wirth
8823db6c78 Bump more deps 2023-06-22 11:44:10 +02:00
Lukas Wirth
4fa3f1ef5c Bump serde 2 things 2023-06-22 11:44:10 +02:00
dfireBird
b8017928af
Change comparsion for checking if number is negative to include 128
Reason: The last byte in Little Endian representation of negative
integers start at 128 (Ox80) till 255 (OxFF). The comparison before
the fix didn't check for 128 which made is_negative variable as false.
2023-06-22 12:51:35 +05:30
bors
85493dfdb0 Auto merge of #15104 - Veykril:mir-borrow-synthetic, r=Veykril
Skip mutable diagnostics on synthetic bindings

Fixes https://github.com/rust-lang/rust-analyzer/issues/15099

We probabnly need to look into this in a more general manner in the future now that we desugar more things
2023-06-21 17:41:00 +00:00
Lukas Wirth
d8b970f1fc Skip mutable diagnostics on synthetic bindings 2023-06-21 19:38:19 +02:00
bors
ae22869e36 Auto merge of #15100 - lnicola:vfs-path-fmt, r=Veykril
internal: Simplify `VfsPath` `fmt` impls

Fixes https://github.com/rust-lang/rust-analyzer/pull/15097#discussion_r1236169290
2023-06-21 17:26:39 +00:00
bors
fe43be5d9b Auto merge of #15102 - Veykril:markdown-inject, r=Veykril
Remove markdown injection for block comments

Closes https://github.com/rust-lang/rust-analyzer/issues/15091

I tried making it work but it doesn't seem possible, as the `*` of the closing `*/` sequence gets eaten by the markdown grammar no matter what.
2023-06-21 17:09:36 +00:00
Lukas Wirth
c672cedeba Remove markdown injection for block comments 2023-06-21 19:08:00 +02:00
Ali Bektas
1de842a7ba Check Workspace Edit ResourceOps
Fixes #14780 . This commit introduces guards for checking if the client supports ResourceOperations for operations to use them.
2023-06-21 18:20:22 +02:00
Laurențiu Nicola
f5876aee1e Simplify VfsPath fmt 2023-06-21 16:13:17 +03:00
bors
6d333e587d Auto merge of #15098 - davidlattimore:libs-from-crates-io, r=Veykril
Use lib crates from crates.io

See lib/README.md for justification
2023-06-21 06:57:32 +00:00
David Lattimore
5c8d1a46b5 Use lib crates from crates.io
See lib/README.md for justification
2023-06-21 16:10:17 +10:00
bors
bc26e81cd5 Auto merge of #15070 - Veykril:analysis-stat-stuff, r=Veykril
internal: Report metric timings for file item trees and crate def map creation
2023-06-21 05:58:13 +00:00
bors
2d64a0aa6e Auto merge of #15097 - HKalbasi:abs-path-display, r=matklad
Fix VfsPath Display and Debug impls

fix https://github.com/rust-lang/rust-analyzer/pull/15087#discussion_r1234544484
r? `@matklad`
2023-06-20 21:22:59 +00:00
hkalbasi
10aba11b29 Fix VfsPath Display and Debug impls 2023-06-20 23:17:42 +03:30
bors
7ebe7ac908 Auto merge of #15095 - davidlattimore:lib-workspace-deps, r=lnicola
Change in-tree libs to workspace dependencies and bump versions
2023-06-20 05:35:56 +00:00
David Lattimore
fb3e54ef05 Release lsp-server 0.7.1 2023-06-20 13:53:39 +10:00
David Lattimore
a0467c546c Release la-arena 0.3.1 2023-06-20 13:53:39 +10:00
David Lattimore
bea3a33d84 Change in-tree libs to workspace dependencies 2023-06-20 13:53:39 +10:00
bors
40ed61e843 Auto merge of #15093 - HKalbasi:format-args, r=HKalbasi
Use `ArgumentV1` instead of `Argument`

Now that the choice is between supporting stable and supporting nothing, let's support stable.

cc #15082
2023-06-19 19:42:13 +00:00
hkalbasi
3c87825074 Use ArgumentV1 instead of Argument 2023-06-19 22:48:49 +03:30
bors
f99348578a Auto merge of #15074 - oxalica:fix/inline-async-fn, r=lowr
Correctly handle inlining of async fn

Fixes #10198
2023-06-19 15:46:55 +00:00
oxalica
2cd7b0cfce Remove unused StmtList::push_front 2023-06-19 22:56:31 +08:00
bors
67e1f52062 Auto merge of #15086 - Veykril:import-intern, r=Veykril
internal: Intern use and extern crate items like other items

Looking a bit into supporting use aliases and attributes better
2023-06-19 13:51:41 +00:00