Commit Graph

1142 Commits

Author SHA1 Message Date
Laurențiu Nicola
f5db6e0e95 Bump parser step limit a little 2021-12-06 11:47:36 +02:00
Laurențiu Nicola
bff377c712 Clean up some unused cross-crate dependencies 2021-12-05 13:54:49 +02:00
Laurențiu Nicola
b7368d34a6 Bump pulldown-cmark-to-cmark 2021-12-04 15:21:04 +02:00
Laurențiu Nicola
076f2247f2 Bump miow 2021-12-04 15:17:30 +02:00
Laurențiu Nicola
f2a1082c84 Bump countme 2021-12-04 15:14:31 +02:00
Laurențiu Nicola
26aba38168 Bump chalk 2021-12-04 15:08:43 +02:00
Laurențiu Nicola
89a1256f9a Bump most deps 2021-12-04 15:08:37 +02:00
Lukas Wirth
92f7db447c minor: Lift out FxIndex{Map/Set} types into ide_db 2021-11-16 12:15:47 +01:00
Laurențiu Nicola
e98b072da7 Bump chalk 2021-11-09 20:05:04 +02:00
Laurențiu Nicola
eb879ee06c Bump libc and paste 2021-11-09 20:03:48 +02:00
Laurențiu Nicola
d18a379c7b Bump deps 2021-11-06 17:40:38 +02:00
Laurențiu Nicola
80f9afa1ec Bump object avoid a duplicate dependency 2021-10-30 09:02:45 +03:00
bors[bot]
103bef178c
Merge #10650
10650: minor: Bump deps r=lnicola a=lnicola



Co-authored-by: Laurențiu Nicola <lnicola@dend.ro>
2021-10-29 20:27:51 +00:00
Laurențiu Nicola
d0a99ad54e Bump chalk 2021-10-29 23:26:59 +03:00
Laurențiu Nicola
79d3f61590 Bump some deps 2021-10-29 23:26:58 +03:00
Lukas Wirth
ebd63ec1cf feat: Make unqualified derive attributes flyimportable 2021-10-29 14:51:26 +02:00
bors[bot]
11326a6847
Merge #10387
10387: Move `IdxRange` into la-arena r=Veykril a=arzg

Currently, `IdxRange` (named `IdRange`) is located in `hir_def::item_tree`, when really it isn’t specific to `hir_def` and could become part of la-arena. The rename from `IdRange` to `IdxRange` is to maintain consistency with the naming convention used throughout la-arena (`Idx` instead of `Id`, `RawIdx` instead of `RawId`). This PR also adds a few new APIs to la-arena on top of `IdxRange` for convenience, namely:

- indexing into an `Arena` by an `IdxRange` and getting a slice of values back
- creating an `IdxRange` from an inclusive range

Currently this PR also exposes a new `Arena::next_idx` method to make constructing inclusive`IdxRange`s using `IdxRange::new` easier; however, it would in my opinion be better to remove this as it allows for easy creation of out-of-bounds `Idx`s, when `IdxRange::new_inclusive` mostly covers the same use-case while being less error-prone.

I decided to bump the la-arena version to 0.3.0 from 0.2.0 because adding a new `Index` impl for `Arena` turned out to be a breaking change: I had to add a type hint in `crates/hir_def/src/body/scope.rs` when one wasn’t necessary before, since rustc couldn’t work out the type of a closure parameter now that there are multiple `Index` impls. I’m not sure whether this is the right decision, though. 

Co-authored-by: Aramis Razzaghipour <aramisnoah@gmail.com>
2021-10-20 20:54:36 +00:00
bors[bot]
dfa355b431
Merge #10588
10588: internal: Parse const trait bounds r=Veykril a=Veykril

Fixes https://github.com/rust-analyzer/rust-analyzer/issues/10582
bors r+

Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
2021-10-19 12:32:30 +00:00
Lukas Wirth
b219a4c465 internal: Parse const trait bounds 2021-10-19 14:20:00 +02:00
Laurențiu Nicola
edb03ad6f1 Pull in new lsp-types for VS compat 2021-10-18 12:03:49 +03:00
Jeremy Kolb
14ddc3353e Update crates 2021-10-15 07:12:30 -04:00
Aramis Razzaghipour
dce5c640f8
Move IdxRange into la_arena 2021-10-15 13:03:28 +11:00
bors[bot]
1cca1fa5bf
Merge #10525
10525: Regenerate lints and features r=Veykril a=Veykril

bors r+

Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
2021-10-12 07:56:00 +00:00
Lukas Wirth
ed7c2948b3 Move lint source generator 2021-10-12 08:59:39 +02:00
Alex Muscar
41856e2682 fix: make signature info response conform to spec
This addreses
https://github.com/rust-analyzer/rust-analyzer/issues/10464.

This patch picks up `lsp-types` 0.90.1, which serialises the
`SignatureInformation` and `ParameterInformation` with the right casing.
It also adds `activeSignature` field as part of the top-level signature
response. It keeps `activeParameter` at the top-level for backwards
compatibility.
2021-10-11 20:42:16 +01:00
Aleksey Kladov
afacdd612d internal: update expect 2021-10-09 17:17:16 +03:00
Jonas Schievink
f8acae7895 Support let...else 2021-10-07 17:06:24 +02:00
bors[bot]
f30b62b751
Merge #10479
10479: fix: fix "index out of bounds" panic in name resolution r=jonas-schievink a=jonas-schievink

Closes https://github.com/rust-analyzer/rust-analyzer/issues/10084
Closes https://github.com/rust-analyzer/rust-analyzer/issues/9163

This is really just a salsa update to a version that removes the problematic code (see https://github.com/rust-analyzer/rust-analyzer/issues/10084#issuecomment-934445711)

bors r+

Co-authored-by: Jonas Schievink <jonasschievink@gmail.com>
2021-10-06 20:54:27 +00:00
Jonas Schievink
cda9668289 Update salsa 2021-10-06 22:42:54 +02:00
Lukas Wirth
fb27c58a04 Update Cargo.lock 2021-10-06 22:34:55 +02:00
Lukas Wirth
454ecd167c Make multiple import edits work for completions 2021-10-04 21:44:33 +02:00
Laurențiu Nicola
035cb443aa Bump notify 2021-10-01 18:57:04 +03:00
Laurențiu Nicola
ffa8270f6a Bump memmap2 2021-10-01 18:55:52 +03:00
Laurențiu Nicola
34adcc800c Bump libc 2021-10-01 18:51:45 +03:00
Laurențiu Nicola
193a926d45 Bump deps 2021-10-01 18:50:52 +03:00
bors[bot]
ee12b0f173
Merge #10181
10181: Begining of lsif r=HKalbasi a=HKalbasi

This PR adds a `lsif` command to cli, which can be used as `rust-analyzer lsif /path/to/project > dump.lsif`. It now generates a valid, but pretty useless lsif (only supports folding ranges). The propose of this PR is to discussing about the structure of lsif generator, before starting anything serious.

cc `@matklad` #8696 #3098


Co-authored-by: hamidreza kalbasi <hamidrezakalbasi@protonmail.com>
2021-09-29 13:13:03 +00:00
Aleksey Kladov
2bf81922f7 internal: more reasonable grammar for blocks
Consider these expples

        { 92 }
  async { 92 }
    'a: { 92 }
   #[a] { 92 }

Previously the tree for them were

  BLOCK_EXPR
    { ... }

  EFFECT_EXPR
    async
    BLOCK_EXPR
      { ... }

  EFFECT_EXPR
    'a:
    BLOCK_EXPR
      { ... }

  BLOCK_EXPR
    #[a]
    { ... }

As you see, it gets progressively worse :) The last two items are
especially odd. The last one even violates the balanced curleys
invariant we have (#10357) The new approach is to say that the stuff in
`{}` is stmt_list, and the block is stmt_list + optional modifiers

  BLOCK_EXPR
    STMT_LIST
      { ... }

  BLOCK_EXPR
    async
    STMT_LIST
      { ... }

  BLOCK_EXPR
    'a:
    STMT_LIST
      { ... }

  BLOCK_EXPR
    #[a]
    STMT_LIST
      { ... }
2021-09-26 19:16:09 +03:00
hamidreza kalbasi
13d36e96c2 use crates io version 2021-09-26 10:39:23 +03:30
hamidreza kalbasi
70061d2b7e move lsif types to lsp types crate 2021-09-26 10:04:02 +03:30
Lukas Wirth
42eb4efb5b Cleanup 2021-09-23 16:28:03 +02:00
Lukas Wirth
a6dde501df Only strip derive attributes when preparing macro input 2021-09-19 23:38:38 +02:00
Giles Cope
15312aab58
removing seemingly unused dev deps. 2021-09-11 16:26:36 +01:00
Giles Cope
4ccd90af81
remove unused deps 2021-09-11 16:20:04 +01:00
Laurențiu Nicola
c930dcca13 Bump chalk 2021-09-09 21:12:38 +03:00
Laurențiu Nicola
968000ee96 Bump deps 2021-09-09 21:09:57 +03:00
Aleksey Kladov
dbb702cfc1 internal: remove accidental code re-use
FragmentKind played two roles:

* entry point to the parser
* syntactic category of a macro call

These are different use-cases, and warrant different types. For example,
macro can't expand to visibility, but we have such fragment today.

This PR introduces `ExpandsTo` enum to separate this two use-cases.

I suspect we might further split `FragmentKind` into `$x:specifier` enum
specific to MBE, and a general parser entry point, but that's for
another PR!
2021-09-05 22:36:36 +03:00
Jade
1857b2b5d6 Update dependency minor versions 2021-09-04 00:27:05 -07:00
Jonas Schievink
8969cbb22f Depend on both crates individually 2021-08-31 13:10:16 +02:00
Jonas Schievink
e6255356d2 Fix DNF construction, add proptest 2021-08-30 22:26:35 +02:00
Dezhi Wu
ba0947dded switch log crate to tracing 2021-08-30 15:11:42 +08:00