Commit graph

6306 commits

Author SHA1 Message Date
Aleksey Kladov
2619950b3b Use different types for path with and without generics 2019-12-14 19:15:40 +01:00
Aleksey Kladov
f720855e1e Use all-features by default 2019-12-14 17:05:12 +01:00
bors[bot]
77db617765
Merge #2554
2554: Add macros for known names and paths r=matklad a=flodiebold



Co-authored-by: Florian Diebold <flodiebold@gmail.com>
2019-12-14 14:08:08 +00:00
bors[bot]
7238037de4
Merge #2548
2548: Support setting cargo features and resolve `default` features by default r=matklad a=oxalica

Fixes #2524 


Co-authored-by: oxalica <oxalicc@pm.me>
2019-12-14 11:57:49 +00:00
bors[bot]
35b2231247
Merge #2557
2557: Remove some unwraps in add_new r=flodiebold a=kjeremy

I think this file could probably be simplified a little more but this at least gets me around the panic.

Fixes #2556 

Co-authored-by: kjeremy <kjeremy@gmail.com>
2019-12-13 23:55:16 +00:00
kjeremy
03fe6b38b8 Remove some unwraps in add_new 2019-12-13 18:28:01 -05:00
Florian Diebold
f02fcc1644 Use path macro 2019-12-13 22:33:38 +01:00
Florian Diebold
6911bc89a7 Rename N! to name! 2019-12-13 22:33:38 +01:00
Florian Diebold
259c42f00e Add macros for known names and paths 2019-12-13 22:33:37 +01:00
bors[bot]
169fe4932f
Merge #2555
2555: LSP 3.15 supports the deprecated tag on completions r=matklad a=kjeremy

So let's set it.

Co-authored-by: kjeremy <kjeremy@gmail.com>
2019-12-13 21:17:41 +00:00
kjeremy
a234b5a3ca LSP 3.15 supports the deprecated tag on completions 2019-12-13 16:08:47 -05:00
bors[bot]
9c9f4635b4
Merge #2550
2550: Infer - and ! using std::ops::{Neg, Not} r=flodiebold a=kiljacken

Found some low hanging fruit while taking a cursory look at index inferring.

Co-authored-by: Emil Lauridsen <mine809@gmail.com>
2019-12-13 19:49:01 +00:00
oxalica
f56a2a0790
Enable allFeatures by default and fix lints 2019-12-14 00:48:47 +08:00
bors[bot]
ebc95af2b5
Merge #2551
2551: Refactor tt::Subtree delimiter r=matklad a=edwin0cheng

Refactor to : 
```
#[derive(Debug, Clone, PartialEq, Eq, Hash, Default)]
pub struct Subtree {
    pub delimiter: Option<Delimiter>,
    pub token_trees: Vec<TokenTree>,
}

#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash)]
pub enum Delimiter {
    Parenthesis,
    Brace,
    Bracket,
}
```

Co-authored-by: Edwin Cheng <edwin0cheng@gmail.com>
2019-12-13 14:02:26 +00:00
Edwin Cheng
98f98cbb54 Refactor tt::Delimiter 2019-12-13 21:53:34 +08:00
Emil Lauridsen
7705209051 Correctly infer - and ! using std::ops::{Neg,Not} 2019-12-13 12:45:38 +01:00
Emil Lauridsen
95dc2de8e9 Add helper for resolving associated type of trait in infer 2019-12-13 12:45:37 +01:00
bors[bot]
16cf6bcf4b
Merge #2544
2544: Map first and last tokens in original_range r=matklad a=edwin0cheng

This PR try to fix the first part of the `original_range` : Try to map the first token and last token of a `SyntaxNode` , If success, return the union range of mapped tokens. 

Co-authored-by: Edwin Cheng <edwin0cheng@gmail.com>
2019-12-13 10:21:19 +00:00
oxalica
af4eb26645
Support setting cargo features 2019-12-13 18:16:34 +08:00
Edwin Cheng
47f2b5d0d9 Map first and last node in original_range 2019-12-13 02:39:14 +08:00
bors[bot]
5eb5e80de9
Merge #2543
2543: Move use tree lowering to a separate module r=matklad a=matklad



Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2019-12-12 16:18:31 +00:00
Aleksey Kladov
332f2205b0 Correct obsolete comment 2019-12-12 17:17:57 +01:00
Aleksey Kladov
125559c14b Move use tree lowering to a separate module 2019-12-12 17:15:57 +01:00
bors[bot]
254c8efc5b
Merge #2540
2540: Dedupe from_source impls r=matklad a=matklad



Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2019-12-12 14:51:02 +00:00
Aleksey Kladov
8e65b77387 Dedupe from_source impls 2019-12-12 15:50:16 +01:00
bors[bot]
c213c3b36b
Merge #2539
2539: Remove old location infra r=matklad a=matklad



Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2019-12-12 14:20:02 +00:00
Aleksey Kladov
7a255a2f93 Remove old location infra 2019-12-12 15:19:07 +01:00
Aleksey Kladov
56710f119b Move enum&union to new loc 2019-12-12 15:11:57 +01:00
Aleksey Kladov
f135a8ea55 Move structs to new loc 2019-12-12 14:58:04 +01:00
Aleksey Kladov
63c192b34a Simplify from_source 2019-12-12 14:48:33 +01:00
Aleksey Kladov
82e9b24558 Move traits to the new loc 2019-12-12 14:36:14 +01:00
bors[bot]
d8dba7fbe5
Merge #2537
2537: Switch to the new location for impls r=matklad a=matklad



Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2019-12-12 13:25:59 +00:00
Aleksey Kladov
7b0644d81e Switch to the new location for impls 2019-12-12 14:25:34 +01:00
bors[bot]
b2638fcd2c
Merge #2536
2536: Avoid recompiling serde r=matklad a=matklad



Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2019-12-12 13:12:02 +00:00
Aleksey Kladov
b0739d5a26 Avoid recompiling serde 2019-12-12 14:11:06 +01:00
bors[bot]
ca61889e40
Merge #2535
2535: Do not trigger signature help on close r=matklad a=kjeremy

Brings us in line with TS.
Context: https://github.com/rust-analyzer/rust-analyzer/issues/2532#issuecomment-564994368

Co-authored-by: Jeremy Kolb <kjeremy@gmail.com>
2019-12-12 12:57:43 +00:00
Jeremy Kolb
b4c8e5b9e9 Do not trigger signature help on close 2019-12-12 07:55:05 -05:00
bors[bot]
4444192b05
Merge #2530
2530: Update lsp-types more r=matklad a=matklad



Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2019-12-11 17:35:07 +00:00
Aleksey Kladov
6c6e6978eb Update lsp-types more 2019-12-11 18:34:36 +01:00
Aleksey Kladov
b0a4765059 Revert "Revert "Support LSP 3.15""
This reverts commit 1e0bf205ef.
2019-12-11 18:34:01 +01:00
Aleksey Kladov
1e0bf205ef Revert "Support LSP 3.15"
This reverts commit 712700d8e0.
2019-12-11 18:27:34 +01:00
bors[bot]
eb5cd34e8f
Merge #2528
2528: Revert "Support LSP 3.15" r=matklad a=matklad



Co-authored-by: Jeremy Kolb <kjeremy@gmail.com>
Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2019-12-11 16:38:22 +00:00
Aleksey Kladov
58768b2a63 Revert "Support LSP 3.15"
This reverts commit fcccf8ec59.

This causes rust-analyzer die immediatelly after startup
2019-12-11 17:37:32 +01:00
Jeremy Kolb
712700d8e0 Support LSP 3.15
This merely upgrades our protocol support. It does not add any of the new features.
2019-12-11 17:35:08 +01:00
bors[bot]
797a6c3041
Merge #2527
2527: Enable tsc builtin lint options  for vscode/extension r=matklad a=saneyuki

* These options are not enabled by `--strict` option and these options make a code more solid.
    * https://www.typescriptlang.org/docs/handbook/compiler-options.html
* For `noUnusedParameters` , we need to tweak tslint option to allow `_bar` style.

Co-authored-by: Tetsuharu OHZEKI <tetsuharu.ohzeki@gmail.com>
2019-12-11 16:14:41 +00:00
Tetsuharu OHZEKI
f0f259bda3 Enable noFallthroughCasesInSwitch option for vscode extension 2019-12-12 01:11:53 +09:00
Tetsuharu OHZEKI
0e9cabab3f Enable noImplicitReturns option for vscode extension 2019-12-12 01:11:53 +09:00
Tetsuharu OHZEKI
b21bb44c8d Enable noUnusedParameters option for vscode extension 2019-12-12 00:56:29 +09:00
bors[bot]
1434849222
Merge #2525
2525: Use ES2018 for vscode extension r=matklad a=saneyuki

Today's latest vscode v1.40 (Node.jsv12.4/V8 v7.6) supports ES2018
features natively.

We don't have to transform codes to ES6.

Co-authored-by: Tetsuharu OHZEKI <tetsuharu.ohzeki@gmail.com>
2019-12-11 15:15:34 +00:00
bors[bot]
7f0ba043dc
Merge #2526
2526: Support LSP 3.15 r=matklad a=kjeremy

This merely upgrades our protocol support. It does not add any of the new features.

Co-authored-by: Jeremy Kolb <kjeremy@gmail.com>
2019-12-11 15:06:26 +00:00