]> git.lizzy.rs Git - rust.git/log
rust.git
4 years agofeat: add support for feature attributes in struct literal
Benjamin Coenen [Thu, 9 Apr 2020 16:37:34 +0000 (18:37 +0200)]
feat: add support for feature attributes in struct literal

Signed-off-by: Benjamin Coenen <5719034+bnjjj@users.noreply.github.com>
4 years agofeat: add support for feature attributes in struct literal
Benjamin Coenen [Thu, 9 Apr 2020 16:32:02 +0000 (18:32 +0200)]
feat: add support for feature attributes in struct literal

Signed-off-by: Benjamin Coenen <5719034+bnjjj@users.noreply.github.com>
4 years agoMerge #3915
bors[bot] [Thu, 9 Apr 2020 16:15:21 +0000 (16:15 +0000)]
Merge #3915

3915: Prettify generated code r=matklad a=matklad

bors r+
🤖

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
4 years agoPut displays at the end
Aleksey Kladov [Thu, 9 Apr 2020 16:11:16 +0000 (18:11 +0200)]
Put displays at the end

4 years agoMore compact
Aleksey Kladov [Thu, 9 Apr 2020 16:08:54 +0000 (18:08 +0200)]
More compact

4 years agoMore compact generated code
Aleksey Kladov [Thu, 9 Apr 2020 16:03:03 +0000 (18:03 +0200)]
More compact generated code

4 years agoMove the rest of the tokens to generated/tokens
Aleksey Kladov [Thu, 9 Apr 2020 15:58:15 +0000 (17:58 +0200)]
Move the rest of the tokens to generated/tokens

4 years agoMove generated tokens to a separate file
Aleksey Kladov [Thu, 9 Apr 2020 15:47:46 +0000 (17:47 +0200)]
Move generated tokens to a separate file

4 years agoStart ast/generated/tokens
Aleksey Kladov [Thu, 9 Apr 2020 14:25:06 +0000 (16:25 +0200)]
Start ast/generated/tokens

4 years agoPrepare for spliting generated into tokens and nodes
Aleksey Kladov [Thu, 9 Apr 2020 14:17:18 +0000 (16:17 +0200)]
Prepare for spliting generated into tokens and nodes

4 years agoReduce visibility
Aleksey Kladov [Thu, 9 Apr 2020 13:49:17 +0000 (15:49 +0200)]
Reduce visibility

4 years agoCleanup import
Aleksey Kladov [Thu, 9 Apr 2020 13:47:48 +0000 (15:47 +0200)]
Cleanup import

4 years agoMerge #3913
bors[bot] [Thu, 9 Apr 2020 11:58:15 +0000 (11:58 +0000)]
Merge #3913

3913: Remove allocations from LCA r=matklad a=matklad

I haven't actually profiled this, but not allocating a hash map (or
anything, really) seems like a good idea

bors r+
🤖

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
4 years agoRemove allocations from LCA
Aleksey Kladov [Thu, 9 Apr 2020 11:56:45 +0000 (13:56 +0200)]
Remove allocations from LCA

I haven't actually profiled this, but not allocating a hash map (or
anything, really) seems like a good idea

4 years agoMerge #3912
bors[bot] [Thu, 9 Apr 2020 11:09:19 +0000 (11:09 +0000)]
Merge #3912

3912: Parse correctly fn f<T>() where T: Fn() -> u8 + Send {} r=matklad a=matklad

We used to parse it as T: Fn() -> (u8 + Send), which is different from
the rustc behavior of T: (Fn() -> u8) + Send

bors r+
🤖

Co-authored-by: Luca Barbieri <luca@luca-barbieri.com>
4 years agoParse correctly fn f<T>() where T: Fn() -> u8 + Send {}
Luca Barbieri [Fri, 3 Apr 2020 19:12:10 +0000 (21:12 +0200)]
Parse correctly fn f<T>() where T: Fn() -> u8 + Send {}

We used to parse it as T: Fn() -> (u8 + Send), which is different from
the rustc behavior of T: (Fn() -> u8) + Send

4 years agoMerge #3911
bors[bot] [Thu, 9 Apr 2020 11:00:55 +0000 (11:00 +0000)]
Merge #3911

3911: Genrate token accessors r=matklad a=matklad

bors r+
🤖

Co-authored-by: Luca Barbieri <luca@luca-barbieri.com>
Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
4 years agoScale back to only two traits
Aleksey Kladov [Thu, 9 Apr 2020 11:00:09 +0000 (13:00 +0200)]
Scale back to only two traits

4 years agoProvide more complete AST accessors to support usage in rustc
Luca Barbieri [Fri, 3 Apr 2020 19:12:09 +0000 (21:12 +0200)]
Provide more complete AST accessors to support usage in rustc

4 years agoMerge #3909
bors[bot] [Thu, 9 Apr 2020 09:24:19 +0000 (09:24 +0000)]
Merge #3909

3909: Generate tokense r=matklad a=matklad

bors r+
🤖

Co-authored-by: Luca Barbieri <luca@luca-barbieri.com>
Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
4 years agoScale back the traits
Aleksey Kladov [Thu, 9 Apr 2020 08:47:05 +0000 (10:47 +0200)]
Scale back the traits

4 years agoMerge #3880
bors[bot] [Thu, 9 Apr 2020 08:08:55 +0000 (08:08 +0000)]
Merge #3880

3880: Add support for attributes for struct fields r=matklad a=bnjjj

Hello I try to solve this example:
```rust
struct MyStruct {
    my_val: usize,
    #[cfg(feature = "foo")]
    bar: bool,
}
impl MyStruct {
    #[cfg(feature = "foo")]
    pub(crate) fn new(my_val: usize, bar: bool) -> Self {
        Self { my_val, bar }
    }
    #[cfg(not(feature = "foo"))]
    pub(crate) fn new(my_val: usize, _bar: bool) -> Self {
        Self { my_val }
    }
}
```

Here is a draft PR to try to solve this issue. In fact for now when i have this kind of example, rust-analyzer tells me that my second Self {} miss the bar field. Which is a bug.

I have some difficulties to add this features. Here in my draft I share my work about adding attributes support on struct field data. But I'm stuck when I have to fetch attributes from parent expressions. I don't really know how to do that. For the first iteration I just want to solve my issue without solving on all different expressions. And then after I will try to implement that on different kind of expression. I think I have to fetch my FunctionId and then I will be able to find attributes with myFunction.attrs() But I don't know if it's the right way.

@matklad (or anyone else) if you can help me it would be great :D

Co-authored-by: Benjamin Coenen <5719034+bnjjj@users.noreply.github.com>
4 years agoMerge #3908
bors[bot] [Thu, 9 Apr 2020 08:01:34 +0000 (08:01 +0000)]
Merge #3908

3908: Fix add missing items assist order r=matklad a=matklad

closes #3904

bors r+
🤖

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
4 years agoFix add missing items assist order
Aleksey Kladov [Thu, 9 Apr 2020 08:00:27 +0000 (10:00 +0200)]
Fix add missing items assist order

closes #3904

4 years agofeat: add attributes support on struct fields and method #3870
Benjamin Coenen [Thu, 9 Apr 2020 07:39:17 +0000 (09:39 +0200)]
feat: add attributes support on struct fields and method #3870

Signed-off-by: Benjamin Coenen <5719034+bnjjj@users.noreply.github.com>
4 years agoMerge #3906
bors[bot] [Thu, 9 Apr 2020 07:38:55 +0000 (07:38 +0000)]
Merge #3906

3906: Implement proc_macro rustc server r=matklad a=edwin0cheng

This PR implement the `ra_tt::TokenTree` based rustc server for lib_proc_macro.

Note that span information is not implemented yet.

Co-authored-by: Edwin Cheng <edwin0cheng@gmail.com>
4 years agoRemove unused func
Edwin Cheng [Thu, 9 Apr 2020 04:28:58 +0000 (12:28 +0800)]
Remove unused func

4 years agoAdd rustc_server (ra_tt rustc bridge)
Edwin Cheng [Sat, 4 Apr 2020 08:07:22 +0000 (16:07 +0800)]
Add rustc_server (ra_tt rustc bridge)

4 years agoMerge #3902
bors[bot] [Wed, 8 Apr 2020 22:36:25 +0000 (22:36 +0000)]
Merge #3902

3902: Better Sublime Documentation r=matklad a=Elinvynia

LSP by default now has the correct rust-analyzer configuration, I feel like updating it will make it less confusing for new users.

Co-authored-by: Elinvynia <59487684+Elinvynia@users.noreply.github.com>
4 years agoBetter Sublime documentation
Elinvynia [Wed, 8 Apr 2020 22:32:56 +0000 (00:32 +0200)]
Better Sublime documentation

4 years agoMerge #3899
bors[bot] [Wed, 8 Apr 2020 20:39:45 +0000 (20:39 +0000)]
Merge #3899

3899: Enable the SemanticTokensFeature by default r=matklad a=kjeremy

This is covered under vscode's "editor.semanticHighlighting.enabled"
setting plus the user has to have a theme that has opted into highlighting.

Bumps required vscode stable to 1.44

Closes #3773

Co-authored-by: kjeremy <kjeremy@gmail.com>
4 years agoEnable the SemanticTokensFeature by default
kjeremy [Wed, 8 Apr 2020 19:45:39 +0000 (15:45 -0400)]
Enable the SemanticTokensFeature by default

This is covered under vscode's "editor.semanticHighlighting.enabled"
setting plus the user has to have a theme that has opted into highlighting.

Bumps required vscode stable to 1.44

4 years agoMerge #3884
bors[bot] [Wed, 8 Apr 2020 17:52:41 +0000 (17:52 +0000)]
Merge #3884

3884: Match check fix missing pattern panic r=flodiebold a=JoshMcguigan

As reported by @cynecx, match arm exhaustiveness checking could panic when tuple enums were missing their pattern. This was reported in the comments of #3706.

This fixes the panic, and adds a similar test to ensure tuples don't have this problem.

It turns out malformed tuple patterns are caught in the "type check" outside the `is_useful` function, while malformed enum tuple patterns are not. This makes sense to me in hindsight, since the type checker can tell that an enum is the right type even if it is missing its internal pattern, but a tuple (non-enum) just becomes a different type if it is "missing" its pattern. This discrepency is why we report a diagnostic in the tuple case (because all arms are filtered out, so there are missing arms), but not in the enum tuple case (because we return an `Err(MalformedMatchArm)` from `is_useful`). I don't think this is that big of a deal, because in both cases this is malformed code and there should eventually be a `MalformedMatchArm` diagnostic or similar. But perhaps we should change things so that if any arm fails the type check we skip the entire diagnostic? That would at least make these two cases behave in the same way.

@flodiebold

Co-authored-by: Josh Mcguigan <joshmcg88@gmail.com>
4 years agomatch checking add additional test for match checking tuple with missing pattern
Josh Mcguigan [Tue, 7 Apr 2020 22:39:50 +0000 (15:39 -0700)]
match checking add additional test for match checking tuple with missing pattern

4 years agofix panic in match checking when tuple enum missing pattern
Josh Mcguigan [Tue, 7 Apr 2020 22:32:14 +0000 (15:32 -0700)]
fix panic in match checking when tuple enum missing pattern

4 years agofeat: add attributes support on struct fields and method #3870
Benjamin Coenen [Wed, 8 Apr 2020 16:12:15 +0000 (18:12 +0200)]
feat: add attributes support on struct fields and method #3870

Signed-off-by: Benjamin Coenen <5719034+bnjjj@users.noreply.github.com>
4 years agoAdd AstElement trait, generate tokens, support tokens in enums
Luca Barbieri [Fri, 3 Apr 2020 19:12:08 +0000 (21:12 +0200)]
Add AstElement trait, generate tokens, support tokens in enums

- Adds a new AstElement trait that is implemented by all generated
  node, token and enum structs

- Overhauls the code generators to code-generate all tokens, and
  also enhances enums to support including tokens, node, and nested
  enums

4 years agoMerge #3895
bors[bot] [Wed, 8 Apr 2020 14:15:54 +0000 (14:15 +0000)]
Merge #3895

3895: Fix warnings emitted when compiling as part of rustc r=matklad a=matklad

bors r+
🤖

Co-authored-by: Luca Barbieri <luca@luca-barbieri.com>
4 years agoFix warnings emitted when compiling as part of rustc
Luca Barbieri [Fri, 3 Apr 2020 19:12:07 +0000 (21:12 +0200)]
Fix warnings emitted when compiling as part of rustc

4 years agoMerge #3826
bors[bot] [Wed, 8 Apr 2020 12:00:08 +0000 (12:00 +0000)]
Merge #3826

3826: Flatten nested highlight ranges during DFS traversal r=matklad a=ltentrup

Implements the flattening of nested highlights from #3447.

There is a caveat: I needed to add `Clone` to `HighlightedRange` to split highlight ranges  ~and the nesting does not appear in the syntax highlighting test (it does appear in the accidental-quadratic test but there it is not checked against a ground-truth)~.

I have added a test case for the example mentioned in #3447.

Co-authored-by: Leander Tentrup <leander.tentrup@gmail.com>
4 years agoMerge #3892
bors[bot] [Wed, 8 Apr 2020 10:51:46 +0000 (10:51 +0000)]
Merge #3892

3892: Add L_DOLLAR for TYPE_RECOVERY_SET r=matklad a=edwin0cheng

This PR is a hot fix for issue #3861 that just prevent it make the parser being stuck.

The actual problem described in https://github.com/rust-analyzer/rust-analyzer/pull/3873#issuecomment-610208693 is a very deep rabbit hole I don't want to dig right now :(

Co-authored-by: Edwin Cheng <edwin0cheng@gmail.com>
4 years agoAdd L_DOLLAR for TYPE_RECOVERY_SET
Edwin Cheng [Wed, 8 Apr 2020 10:34:20 +0000 (18:34 +0800)]
Add L_DOLLAR for TYPE_RECOVERY_SET

4 years agofmt
Aleksey Kladov [Wed, 8 Apr 2020 10:19:41 +0000 (12:19 +0200)]
fmt

4 years agoDon't strip nightly releases
Aleksey Kladov [Wed, 8 Apr 2020 09:47:40 +0000 (11:47 +0200)]
Don't strip nightly releases

4 years agoMerge #3879
bors[bot] [Tue, 7 Apr 2020 16:55:28 +0000 (16:55 +0000)]
Merge #3879

3879: Update some packages r=matklad a=kjeremy

Co-authored-by: kjeremy <kjeremy@gmail.com>
4 years agoMerge #3882
bors[bot] [Tue, 7 Apr 2020 16:48:15 +0000 (16:48 +0000)]
Merge #3882

3882: Move computation of missing fields into hir r=matklad a=matklad

cc @SomeoneToIgnore, this is that refactoring that moves computation of missing fields to hir.

it actually removes meaningful duplication between diagnostics code and the completion code. Nontheless, it's a net addition of code :(

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
4 years agoMove computation of missing fields into hir
Aleksey Kladov [Tue, 7 Apr 2020 15:09:02 +0000 (17:09 +0200)]
Move computation of missing fields into hir

4 years agoMerge #3881
bors[bot] [Tue, 7 Apr 2020 16:26:49 +0000 (16:26 +0000)]
Merge #3881

3881: Add functional update test r=matklad a=matklad

bors r+
🤖

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
4 years agoAdd functional update test
Aleksey Kladov [Tue, 7 Apr 2020 16:25:47 +0000 (18:25 +0200)]
Add functional update test

4 years agoFix names of test modules
Aleksey Kladov [Tue, 7 Apr 2020 16:23:18 +0000 (18:23 +0200)]
Fix names of test modules

4 years agoMerge branch 'master' of github.com:rust-analyzer/rust-analyzer
Benjamin Coenen [Tue, 7 Apr 2020 15:59:09 +0000 (17:59 +0200)]
Merge branch 'master' of github.com:rust-analyzer/rust-analyzer

4 years agofeat: add attributes support on struct fields #3870
Benjamin Coenen [Tue, 7 Apr 2020 15:58:05 +0000 (17:58 +0200)]
feat: add attributes support on struct fields #3870

Signed-off-by: Benjamin Coenen <5719034+bnjjj@users.noreply.github.com>
4 years agoUpdate some packages
kjeremy [Tue, 7 Apr 2020 15:17:54 +0000 (11:17 -0400)]
Update some packages

4 years agoMerge #3878
bors[bot] [Tue, 7 Apr 2020 14:41:07 +0000 (14:41 +0000)]
Merge #3878

3878: A more precise panic macro r=matklad a=matklad

bors r+
🤖

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
4 years agoA more precise panic macro
Aleksey Kladov [Tue, 7 Apr 2020 14:40:39 +0000 (16:40 +0200)]
A more precise panic macro

4 years agoDon't insert !() if there's already some
Aleksey Kladov [Tue, 7 Apr 2020 14:37:33 +0000 (16:37 +0200)]
Don't insert !() if there's already some

4 years agoReorder imports
Aleksey Kladov [Tue, 7 Apr 2020 13:07:18 +0000 (15:07 +0200)]
Reorder imports

4 years agoMerge #3706
bors[bot] [Tue, 7 Apr 2020 12:53:47 +0000 (12:53 +0000)]
Merge #3706

3706: missing match arms diagnostic r=flodiebold a=JoshMcguigan

Following up on https://github.com/rust-analyzer/rust-analyzer/pull/3689#issuecomment-602718222, this PR creates a missing match arms diagnostic.

At the moment this is a very early draft, but I wanted to open it just to get some initial feedback.

Initial questions:

* Have I roughly created the correct boilerplate?
* Inside the new `validate_match` function:
  * Am I correct in thinking I want to do validation by comparing the match arms against `match_expr`? And when analyzing `match_expr` I should be looking at it as a `hir_def::expr::Expr`?
  * I mostly copied the chained if-let statements from the struct validation. Shouldn't there be a non-failable way to get an AstPtr from the hir data structures?

Thanks for all the guidance.

Co-authored-by: Josh Mcguigan <joshmcg88@gmail.com>
4 years agoadd fixme to use type checker rather than manually comparing types
Josh Mcguigan [Tue, 7 Apr 2020 12:17:59 +0000 (05:17 -0700)]
add fixme to use type checker rather than manually comparing types

4 years agoPR feedback implementation
Josh Mcguigan [Mon, 6 Apr 2020 22:38:20 +0000 (15:38 -0700)]
PR feedback implementation

4 years agomissing match arms diagnostic change source to match expression
Josh Mcguigan [Mon, 6 Apr 2020 13:55:25 +0000 (06:55 -0700)]
missing match arms diagnostic change source to match expression

4 years agohandle match auto-deref
Josh Mcguigan [Sun, 5 Apr 2020 19:42:24 +0000 (12:42 -0700)]
handle match auto-deref

4 years agoimproving documentation
Josh Mcguigan [Sun, 5 Apr 2020 18:28:53 +0000 (11:28 -0700)]
improving documentation

4 years agohandle non matching enum pattern types
Josh Mcguigan [Sun, 5 Apr 2020 17:16:34 +0000 (10:16 -0700)]
handle non matching enum pattern types

4 years agoremove panics
Josh Mcguigan [Sun, 5 Apr 2020 01:02:27 +0000 (18:02 -0700)]
remove panics

4 years agomissing match arms diagnostic
Josh Mcguigan [Tue, 24 Mar 2020 11:40:58 +0000 (04:40 -0700)]
missing match arms diagnostic

4 years agoMerge #3876
bors[bot] [Tue, 7 Apr 2020 11:23:03 +0000 (11:23 +0000)]
Merge #3876

3876: Better naming for scope completion r=matklad a=matklad

bors r+
🤖

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
4 years agoBetter naming for scope completion
Aleksey Kladov [Tue, 7 Apr 2020 11:20:41 +0000 (13:20 +0200)]
Better naming for scope completion

4 years agoBetter naming for path completion
Aleksey Kladov [Tue, 7 Apr 2020 11:19:57 +0000 (13:19 +0200)]
Better naming for path completion

4 years agoMerge pull request #3863 from Veetaha/feature/migrate-to-rast
Aleksey Kladov [Tue, 7 Apr 2020 11:10:43 +0000 (13:10 +0200)]
Merge pull request #3863 from Veetaha/feature/migrate-to-rast

Migrate tests .txt -> .rast

4 years agoMerge #3875
bors[bot] [Tue, 7 Apr 2020 09:47:40 +0000 (09:47 +0000)]
Merge #3875

3875: When making a release, just promote the latest nightly r=matklad a=matklad

bors r+
🤖

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
4 years agoWhen making a release, just promote the latest nightly
Aleksey Kladov [Tue, 7 Apr 2020 09:37:59 +0000 (11:37 +0200)]
When making a release, just promote the latest nightly

4 years agoFix yaml
Aleksey Kladov [Tue, 7 Apr 2020 07:40:01 +0000 (09:40 +0200)]
Fix yaml

4 years agoFix yaml
Aleksey Kladov [Tue, 7 Apr 2020 07:24:02 +0000 (09:24 +0200)]
Fix yaml

4 years agoMerge pull request #3866 from lnicola/fewer-braces
Aleksey Kladov [Tue, 7 Apr 2020 07:22:33 +0000 (09:22 +0200)]
Merge pull request #3866 from lnicola/fewer-braces

Fix unnecessary braces warnings

4 years agoMerge #3874
bors[bot] [Tue, 7 Apr 2020 07:01:45 +0000 (07:01 +0000)]
Merge #3874

3874: Better config scheme & defaults r=matklad a=matklad

bors r+
🤖

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
4 years agoRun analysis-stats nightly
Aleksey Kladov [Tue, 7 Apr 2020 07:01:01 +0000 (09:01 +0200)]
Run analysis-stats nightly

4 years agoBetter config scheme & defaults
Aleksey Kladov [Tue, 7 Apr 2020 06:51:52 +0000 (08:51 +0200)]
Better config scheme & defaults

4 years agoMerge #3872
bors[bot] [Tue, 7 Apr 2020 06:48:04 +0000 (06:48 +0000)]
Merge #3872

3872: fix cargo check config with custom command r=matklad a=JoshMcguigan

fixes #3871

Previously if `get::<Vec<String>>(value, "/checkOnSave/overrideCommand")` returned `Some` we'd never execute `set(value, "/checkOnSave/command", command)`, even if the `overrideCommand` was empty.

I am not sure of the best way to prove this, but I believe the LSP clients send this config with a default value if it is not set by the user, which means `get::<Vec<String>>(value, "/checkOnSave/overrideCommand")` would return `Some(vec![])` and thus we'd never set the command to the user specified value (in the case of #3871, "clippy").

I have tested this fix manually by installing this modified version of rust-analyzer and verifying I can see clippy lints in my editor (`coc.nvim`) with `rust-analyzer.checkOnSave.command": "clippy"`.

As best I can tell this would have affected rustfmt extra args too, so this PR also applies the same fix there.

Co-authored-by: Josh Mcguigan <joshmcg88@gmail.com>
4 years agofix cargo check config with custom command
Josh Mcguigan [Tue, 7 Apr 2020 04:41:31 +0000 (21:41 -0700)]
fix cargo check config with custom command

4 years agoSimplify HTML highlighter and add test case for highlight_injection logic
Leander Tentrup [Mon, 6 Apr 2020 21:00:09 +0000 (23:00 +0200)]
Simplify HTML highlighter and add test case for highlight_injection logic

4 years agoMerge #3868
bors[bot] [Mon, 6 Apr 2020 15:28:42 +0000 (15:28 +0000)]
Merge #3868

3868: Fix Chalk panic r=flodiebold a=flodiebold

Fixes #3865. Basically I forgot to shift 'back' when we got `dyn Trait`s back from Chalk, so after going through Chalk a few times, the panic happened.

And yes, I did run `analysis-stats` now ;)

cc @edwin0cheng

Co-authored-by: Florian Diebold <florian.diebold@freiheit.com>
4 years agoFix Chalk panic
Florian Diebold [Mon, 6 Apr 2020 15:24:08 +0000 (17:24 +0200)]
Fix Chalk panic

Fixes #3865. Basically I forgot to shift 'back' when we got `dyn Trait`s back
from Chalk, so after going through Chalk a few times, the panic happened.

4 years agoMerge pull request #3867 from matklad/deny-eprintln
Aleksey Kladov [Mon, 6 Apr 2020 15:21:47 +0000 (17:21 +0200)]
Merge pull request #3867 from matklad/deny-eprintln

Check for eprintlns on CI

4 years agoMerge #3842
bors[bot] [Mon, 6 Apr 2020 15:08:26 +0000 (15:08 +0000)]
Merge #3842

3842: Add lib-proc-macro mod in ra_proc_macro_srv r=matklad a=edwin0cheng

This PR add a module in ra_proc_macro_srv, which is just copy & paste from rustc lib_proc_macro and remove all unstable features in it.

The main idea here is by doing that, we could build the `ra_proc_macro_srv` without nightly compiler and remain ABI compatibility.

Co-authored-by: Edwin Cheng <edwin0cheng@gmail.com>
4 years agoAdd bridge::TokenStream to crate scope
Edwin Cheng [Sat, 4 Apr 2020 08:28:32 +0000 (16:28 +0800)]
Add bridge::TokenStream to crate scope

4 years agoAdd proc_macro mod (copy from lib_proc_macro)
Edwin Cheng [Sat, 4 Apr 2020 08:04:01 +0000 (16:04 +0800)]
Add proc_macro mod (copy from lib_proc_macro)

4 years agoRefactor deps
Edwin Cheng [Sat, 4 Apr 2020 08:00:21 +0000 (16:00 +0800)]
Refactor deps

4 years agoMore general CI env var
Aleksey Kladov [Mon, 6 Apr 2020 15:01:46 +0000 (17:01 +0200)]
More general CI env var

4 years agoCheck for eprintln on CI
Aleksey Kladov [Mon, 6 Apr 2020 14:58:16 +0000 (16:58 +0200)]
Check for eprintln on CI

4 years agoFix unnecessary braces warnings
Laurențiu Nicola [Mon, 6 Apr 2020 14:21:33 +0000 (17:21 +0300)]
Fix unnecessary braces warnings

4 years agoMerge #3864
bors[bot] [Mon, 6 Apr 2020 13:03:24 +0000 (13:03 +0000)]
Merge #3864

3864: Use log::info in trait_solve_query instead of eprintln r=edwin0cheng a=edwin0cheng

cc @flodiebold

Co-authored-by: Edwin Cheng <edwin0cheng@gmail.com>
4 years agoUse log info in trait_solve_query
Edwin Cheng [Mon, 6 Apr 2020 13:01:58 +0000 (21:01 +0800)]
Use log info in trait_solve_query

4 years agoMigrate tests .txt -> .rast
veetaha [Mon, 6 Apr 2020 11:04:26 +0000 (14:04 +0300)]
Migrate tests .txt -> .rast

The sytax tree output files now use .rast extension
(rust-analyzer syntax tree or rust abstract syntax tree
(whatever)).
This format has a editors/code/ra_syntax_tree.tmGrammar.json declaration
that supplies nice syntax highlighting for .rast files.

4 years agoMerge pull request #3853 from matklad/cf
Aleksey Kladov [Mon, 6 Apr 2020 09:53:56 +0000 (11:53 +0200)]
Merge pull request #3853 from matklad/cf

Make control token modifier less ambiguous

4 years agoMerge #3843
bors[bot] [Mon, 6 Apr 2020 08:42:52 +0000 (08:42 +0000)]
Merge #3843

3843: Remove rustc_lexer dependency in favour of rustc-ap-rustc_lexer r=est31 a=est31

The latter is auto-published on a regular schedule (Right now weekly).

See also https://github.com/alexcrichton/rustc-auto-publish

Co-authored-by: est31 <MTest31@outlook.com>
4 years agoMerge #3829
bors[bot] [Mon, 6 Apr 2020 08:15:48 +0000 (08:15 +0000)]
Merge #3829

3829: Adds to SSR match for semantically equivalent call and method call r=matklad a=mikhail-m1

#3186
maybe I've missed some corner cases, but it works in general

Co-authored-by: Mikhail Modin <mikhailm1@gmail.com>
4 years agoRemove rustc_lexer dependency in favour of rustc-ap-rustc_lexer
est31 [Sat, 4 Apr 2020 11:22:06 +0000 (13:22 +0200)]
Remove rustc_lexer dependency in favour of rustc-ap-rustc_lexer

The latter is auto-published on a regular schedule (Right now weekly).

4 years agoMake control token modifier less ambiguous
Aleksey Kladov [Sun, 5 Apr 2020 12:46:07 +0000 (14:46 +0200)]
Make control token modifier less ambiguous

In textmate, keyword.control is used for all kinds of things; in fact,
the default scope mapping for keyword is keyword.control!

So let's add a less ambiguous controlFlow modifier

See Microsoft/vscode#94367

4 years agoMerge #3744
bors[bot] [Mon, 6 Apr 2020 07:49:09 +0000 (07:49 +0000)]
Merge #3744

3744: Upgrade Chalk r=matklad a=flodiebold

Co-authored-by: Florian Diebold <florian.diebold@freiheit.com>
Co-authored-by: Florian Diebold <flodiebold@gmail.com>