]> git.lizzy.rs Git - rust.git/log
rust.git
4 years agoMerge #4431
bors[bot] [Fri, 15 May 2020 10:17:42 +0000 (10:17 +0000)]
Merge #4431

4431: Store proc-macro result in salsa db r=matklad a=edwin0cheng

Fixed #4315

Co-authored-by: Edwin Cheng <edwin0cheng@gmail.com>
4 years agoMerge #4460
bors[bot] [Fri, 15 May 2020 00:10:58 +0000 (00:10 +0000)]
Merge #4460

4460: Remove flycheck -> LSP dependency r=matklad a=matklad

bors r+
🤖

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
4 years agoCleanups
Aleksey Kladov [Fri, 15 May 2020 00:08:50 +0000 (02:08 +0200)]
Cleanups

4 years agoBetter structure
Aleksey Kladov [Thu, 14 May 2020 23:58:39 +0000 (01:58 +0200)]
Better structure

4 years agoMove LSP bits from flycheck to rust-analyzer
Aleksey Kladov [Thu, 14 May 2020 23:51:48 +0000 (01:51 +0200)]
Move LSP bits from flycheck to rust-analyzer

There should be only one place that knows about LSP, and that place is
right before we spit JSON on stdout.

4 years agoMerge #4273
bors[bot] [Thu, 14 May 2020 14:29:22 +0000 (14:29 +0000)]
Merge #4273

4273: Trigger add_vis assist on paths/record fields as well r=flodiebold a=TimoFreiberg

Resolves #4037.

- [x] Function defs
- [x] ADT defs
- [x] Enum variants
- [x] Consts
- [x] Statics
- [x] Traits
- [x] Type aliases
- [x] Modules
- [x] Record fields (using different implementation)
    - [x] struct fields
    - [x] enum variant fields
    - :x:  union fields (`Semantics::resolve_record_field` seems to not work for union fields, so I think this can be handled in a future PR)
- [x] More tests?
- [x] Improve test fixture code and documentation a bit (see [Zulip](https://rust-lang.zulipchat.com/#narrow/stream/185405-t-compiler.2Fwg-rls-2.2E0/topic/resolve_path.20between.20fixture.20files))

Co-authored-by: Timo Freiberg <timo.freiberg@gmail.com>
4 years agoMerge #4456
bors[bot] [Thu, 14 May 2020 13:36:56 +0000 (13:36 +0000)]
Merge #4456

4456: Sort preselect items on top r=matklad a=matklad

bors r+
🤖

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
4 years agoMinor
Aleksey Kladov [Thu, 14 May 2020 13:36:15 +0000 (15:36 +0200)]
Minor

4 years agoPut preselect items on top
Aleksey Kladov [Thu, 14 May 2020 13:29:40 +0000 (15:29 +0200)]
Put preselect items on top

4 years agoMerge #4455
bors[bot] [Thu, 14 May 2020 13:18:22 +0000 (13:18 +0000)]
Merge #4455

4455: Prioritize locals with correct types r=matklad a=matklad

bors r+
🤖

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
4 years agoPrioritize locals with correct types
Aleksey Kladov [Thu, 14 May 2020 13:15:52 +0000 (15:15 +0200)]
Prioritize locals with correct types

4 years agoMerge #4445
bors[bot] [Thu, 14 May 2020 11:20:42 +0000 (11:20 +0000)]
Merge #4445

4445: Correctly fill default type parameters r=flodiebold a=montekki

Fixes #3877

So, basically even if the parameters are omitted from the `impl` block, check the parameters in `trait` if they have a default type, and if they do go from `hir` to `ast::TypeArg`. I've added a helper for that but I am not sure that it's a proper way to go from `hir` to `ast` here.

Co-authored-by: Fedor Sakharov <fedor.sakharov@gmail.com>
4 years agoTy -> Type
Fedor Sakharov [Thu, 14 May 2020 10:53:45 +0000 (13:53 +0300)]
Ty -> Type

4 years agoAdds a param_idx helper
Fedor Sakharov [Thu, 14 May 2020 10:47:36 +0000 (13:47 +0300)]
Adds a param_idx helper

4 years agoStore proc-macro result in salsa db
Edwin Cheng [Thu, 14 May 2020 09:57:37 +0000 (17:57 +0800)]
Store proc-macro result in salsa db

4 years agoMerge #4405
bors[bot] [Thu, 14 May 2020 09:23:34 +0000 (09:23 +0000)]
Merge #4405

4405: Make some stuff public so that they can be reused by other tools r=pksunkara a=pksunkara

So, my little experiment of building a code analysis tool using rust-analyzer is successful. I am going to proceed to build the tool now. This PR makes the needed things public.

I know there were some things about trying to change stuff regarding loading workspaces, which would make it more easier for other tools to reuse. But, until then, it should be okay using this `load_cargo` fn.

Btw, if I were publish my tool, I would need the `ra` crates to be released. Since @matklad told me that he doesn't want to care about breaking stuff, I would propose the following.

Every monday, during the weekly release, we release a new pre v1 minor version of all the crates. That way, we don't need to care about breaking stuff but still have rust-analyzer on crates.io.

I made https://github.com/pksunkara/cargo-workspaces to help release workspace crates easily.

So, coming week, we start with `0.1.0`, then week after that, we release `0.2.0` and then `0.3.0` etc.. until we decide on `1.0.0` which is probably when the compiler team also starts using the crates. There is no limit to the minor versions (we can even have `0.150.0` or `0.1500.0`), so I don't see anything wrong with this strategy.

Co-authored-by: Pavan Kumar Sunkara <pavan.sss1991@gmail.com>
4 years agoMake some stuff public so that they can be reused by other tools
Pavan Kumar Sunkara [Fri, 24 Apr 2020 19:57:10 +0000 (21:57 +0200)]
Make some stuff public so that they can be reused by other tools

4 years agoMerge #4432
bors[bot] [Thu, 14 May 2020 08:28:32 +0000 (08:28 +0000)]
Merge #4432

4432: Update features.md r=matklad a=bnjjj

Co-authored-by: Coenen Benjamin <benjamin.coenen@hotmail.com>
4 years agoFix formatting
Fedor Sakharov [Thu, 14 May 2020 07:31:34 +0000 (10:31 +0300)]
Fix formatting

4 years agoChange type_arg to type_ref func
Fedor Sakharov [Thu, 14 May 2020 07:14:04 +0000 (10:14 +0300)]
Change type_arg to type_ref func

4 years agoUse generic_defaults and display_source_code
Fedor Sakharov [Thu, 14 May 2020 06:56:20 +0000 (09:56 +0300)]
Use generic_defaults and display_source_code

4 years agoMerge #4452
bors[bot] [Wed, 13 May 2020 23:10:05 +0000 (23:10 +0000)]
Merge #4452

4452: Use back ticks instead of single quotes around code r=matklad a=tspiteri

Also, use back ticks instead of single quotes in `rustc_unescape_error_to_string` for `EE:UnclosedUnicodeEscape`.

Co-authored-by: Trevor Spiteri <tspiteri@ieee.org>
4 years agoUse back ticks instead of single quotes around code
Trevor Spiteri [Wed, 13 May 2020 23:06:07 +0000 (01:06 +0200)]
Use back ticks instead of single quotes around code

4 years agoMerge #4447
bors[bot] [Wed, 13 May 2020 17:15:31 +0000 (17:15 +0000)]
Merge #4447

4447: Remove VARIATION SELECTOR-16 in Run arrow r=matklad a=lnicola

Closes #4446, cc @Veetaha.

Co-authored-by: Laurențiu Nicola <lnicola@dend.ro>
4 years agoMerge #4400
bors[bot] [Wed, 13 May 2020 15:43:32 +0000 (15:43 +0000)]
Merge #4400

4400: Enhanced coloring r=georgewfraser a=georgewfraser

This PR builds on #4397 to enhance the existing syntax coloring.

## Underline mutable variables

The textmate scope `markup.underline` underlines identifiers, which is a nice way to make mutable vars stand out:

<img width="327" alt="Screen Shot 2020-05-09 at 1 18 55 PM" src="https://user-images.githubusercontent.com/1369240/81484179-8bb47d80-91f8-11ea-997d-1dcffbe44aa7.png">

## Italicize static variables

The textmate scope `markup.italic` italicizes identifiers. Italic = static is a common convention in IDEs like IntelliJ:

<img width="288" alt="Screen Shot 2020-05-09 at 1 19 14 PM" src="https://user-images.githubusercontent.com/1369240/81484236-cd452880-91f8-11ea-8478-505ee49bc8b3.png">

Co-authored-by: George Fraser <george@fivetran.com>
4 years agoRemove hidden VARIATION SELECTOR-16
Laurențiu Nicola [Wed, 13 May 2020 13:59:28 +0000 (16:59 +0300)]
Remove hidden VARIATION SELECTOR-16

4 years agoCorrectly fill default type parameters
Fedor Sakharov [Wed, 13 May 2020 13:06:42 +0000 (16:06 +0300)]
Correctly fill default type parameters

4 years agoMerge #4444
bors[bot] [Wed, 13 May 2020 12:49:23 +0000 (12:49 +0000)]
Merge #4444

4444: Update crates r=kjeremy a=kjeremy

Documentation improvements

Co-authored-by: kjeremy <kjeremy@gmail.com>
4 years agoUpdate crates
kjeremy [Wed, 13 May 2020 12:44:15 +0000 (08:44 -0400)]
Update crates

Documentation improvements

4 years agoMerge #4440
bors[bot] [Wed, 13 May 2020 12:40:59 +0000 (12:40 +0000)]
Merge #4440

4440: Update packages r=kjeremy a=kjeremy

Co-authored-by: kjeremy <kjeremy@gmail.com>
4 years agoBump packages
kjeremy [Tue, 12 May 2020 21:43:47 +0000 (17:43 -0400)]
Bump packages

4 years agoMerge #4434
bors[bot] [Wed, 13 May 2020 09:25:01 +0000 (09:25 +0000)]
Merge #4434

4434: add more specific match postfix for Result and Option r=matklad a=bnjjj

In order to have the same behavior than `if let` and `while let`

Co-authored-by: Benjamin Coenen <5719034+bnjjj@users.noreply.github.com>
4 years agoMerge #4083
bors[bot] [Wed, 13 May 2020 09:09:46 +0000 (09:09 +0000)]
Merge #4083

4083: Smol documentation for ast nodes r=matklad a=Veetaha

There is a tremendous amount of TODOs to clarify the topics I am not certain about.
Please @matklad, @edwin0cheng review carefully, I even left some mentions of your names in todos to put your attention where you most probably can give comments.

In order to simplify the review, I separated the codegen (i.e. changes in `ast/generated/nodes.rs`) from `ast_src` changes (they in fact just duplicate one another) into two commits.

Also, I had to hack a little bit to let the docs be generated as doc comments and not as doc attributes because it's easier to read them this way and IIRC we don't support hints for `#[doc = ""]` attributes for now...

Closes #3682

Co-authored-by: veetaha <veetaha2@gmail.com>
4 years agoMerge #4441
bors[bot] [Wed, 13 May 2020 05:20:02 +0000 (05:20 +0000)]
Merge #4441

4441: fix typo unimplementated -> unimplemented r=edwin0cheng a=tspiteri

Pretty harmless typo, but it does get exposed in lsp-rust-analyzer-expand-macro.

Co-authored-by: Trevor Spiteri <tspiteri@ieee.org>
4 years agofix typo unimplementated -> unimplemented
Trevor Spiteri [Tue, 12 May 2020 21:51:38 +0000 (23:51 +0200)]
fix typo unimplementated -> unimplemented

Pretty harmless typo, but it does get exposed in
lsp-rust-analyzer-expand-macro.

4 years agovscode engine 1.45
kjeremy [Tue, 12 May 2020 21:36:03 +0000 (17:36 -0400)]
vscode engine 1.45

latest stable

4 years agoMerge #4439
bors[bot] [Tue, 12 May 2020 21:01:09 +0000 (21:01 +0000)]
Merge #4439

4439: Update crates r=kjeremy a=kjeremy

Co-authored-by: kjeremy <kjeremy@gmail.com>
4 years agoConvert TODO about ParamList used in closures to a FIXME
veetaha [Tue, 12 May 2020 20:58:51 +0000 (23:58 +0300)]
Convert TODO about ParamList used in closures to a FIXME

cc @matklad (you didn't comment on this one)

4 years agoRemove an equals sign from `ConstArg` (this probably pertains only to ConstParam)
veetaha [Tue, 12 May 2020 20:57:04 +0000 (23:57 +0300)]
Remove an equals sign from `ConstArg` (this probably pertains only to ConstParam)

(As per matklad)

4 years agoRemove a comment on NameRefToken as per matklad
veetaha [Tue, 12 May 2020 20:55:46 +0000 (23:55 +0300)]
Remove a comment on NameRefToken as per matklad

4 years agoConvert TODO to a FIXME as per matklad
veetaha [Tue, 12 May 2020 20:54:40 +0000 (23:54 +0300)]
Convert TODO to a FIXME as per matklad

4 years agoConvert TODO to a Note(matklad)
veetaha [Tue, 12 May 2020 20:50:52 +0000 (23:50 +0300)]
Convert TODO to a Note(matklad)

4 years agoUpdate crates
kjeremy [Tue, 12 May 2020 20:49:42 +0000 (16:49 -0400)]
Update crates

4 years agoConvert to TODOs to FIXMEs as per matklad
veetaha [Tue, 12 May 2020 20:47:45 +0000 (23:47 +0300)]
Convert to TODOs to FIXMEs as per matklad

4 years agoRevert "Remove MacroStmts as per edwin0cheng" (cc @edwin0cheng) and add a fixme to...
veetaha [Tue, 12 May 2020 20:33:56 +0000 (23:33 +0300)]
Revert "Remove MacroStmts as per edwin0cheng" (cc @edwin0cheng) and add a fixme to document it.

This reverts commit 7a49165f5d5c8186edd04f874eae8a98e39d3df6.
MacroStmts ast node is not used by itself, but it pertains
to SyntaxNodeKind MACRO_STMTS that is used by ra_paser, so
even tho the node itself is not used, it is better to keep it
with a FIXME to actually add a doc comment when it becomes useful.

4 years agoAdd a doc comment on the difference between Name and NameRef ast nodes
veetaha [Tue, 12 May 2020 20:31:37 +0000 (23:31 +0300)]
Add a doc comment on the difference between Name and NameRef ast nodes

4 years agoLeave statics alone
George Fraser [Tue, 12 May 2020 15:36:37 +0000 (08:36 -0700)]
Leave statics alone

4 years agoMark up statics and mutables
George Fraser [Sat, 9 May 2020 20:19:29 +0000 (13:19 -0700)]
Mark up statics and mutables

4 years agoMerge #4436
bors[bot] [Tue, 12 May 2020 15:36:39 +0000 (15:36 +0000)]
Merge #4436

4436: Use .rust suffix on scopes r=matklad a=georgewfraser

This PR should have no effect on people using any of the default themes, but it is possible there are people with custom themes that rely on the .rust suffix on textmate scopes, which I neglected to use consistently in #4397.

Co-authored-by: George Fraser <george@fivetran.com>
4 years agoUse .rust suffix on scopes
George Fraser [Tue, 12 May 2020 15:31:43 +0000 (08:31 -0700)]
Use .rust suffix on scopes

4 years agoadd more specific match postfix for Result and Option
Benjamin Coenen [Tue, 12 May 2020 09:48:58 +0000 (11:48 +0200)]
add more specific match postfix for Result and Option

Signed-off-by: Benjamin Coenen <5719034+bnjjj@users.noreply.github.com>
4 years agoUpdate features.md
Coenen Benjamin [Tue, 12 May 2020 07:46:28 +0000 (09:46 +0200)]
Update features.md

4 years agoMerge pull request #4427 from matklad/old
Aleksey Kladov [Mon, 11 May 2020 19:34:27 +0000 (21:34 +0200)]
Merge pull request #4427 from matklad/old

Use older ubuntu for releases

4 years agoUse older ubuntu for releases
Aleksey Kladov [Mon, 11 May 2020 19:32:48 +0000 (21:32 +0200)]
Use older ubuntu for releases

4 years agoMerge #4423
bors[bot] [Mon, 11 May 2020 18:15:31 +0000 (18:15 +0000)]
Merge #4423

4423: add tests module snippet r=bnjjj a=bnjjj

Request from a friend coming from intellij Rust

Co-authored-by: Benjamin Coenen <5719034+bnjjj@users.noreply.github.com>
4 years agoMerge #4358
bors[bot] [Mon, 11 May 2020 18:08:26 +0000 (18:08 +0000)]
Merge #4358

4358: add if let and while let postfix for Option and Result #4348 r=matklad a=bnjjj

close #4348

I also added `while let` for iterator or stream it could be useful

![iflet](https://user-images.githubusercontent.com/5719034/81278000-676c6b80-9055-11ea-87ad-6b8476dd983f.gif)

Co-authored-by: Benjamin Coenen <5719034+bnjjj@users.noreply.github.com>
4 years agoadd tests module snippet
Benjamin Coenen [Mon, 11 May 2020 17:59:58 +0000 (19:59 +0200)]
add tests module snippet

Signed-off-by: Benjamin Coenen <5719034+bnjjj@users.noreply.github.com>
4 years agoMerge #4397
bors[bot] [Mon, 11 May 2020 17:33:38 +0000 (17:33 +0000)]
Merge #4397

4397: Textmate cooperation r=matklad a=georgewfraser

This PR tweaks the fallback TextMate scopes to make them more consistent with the existing grammar and other languages, and edits the builtin TextMate grammar to align with semantic coloring. Before is on the left, after is on the right:

<img width="855" alt="Screen Shot 2020-05-10 at 1 45 51 PM" src="https://user-images.githubusercontent.com/1369240/81512320-a8be7e80-92d4-11ea-8940-2c03f6769015.png">

**Use keyword.other for regular keywords instead of keyword**. This is a really peculiar quirk of TextMate conventions, but virtually *all* TextMate grammars use `keyword.other` (colored blue in VSCode Dark+) for regular keywords and `keyword.control` (colored purple in VSCode Dark+) for control keywords. The TextMate scope `keyword` is colored like control keywords, not regular keywords. It may seem strange that the `keyword` scope is not the right fallback for the `keyword` semantic token, but TextMate has a long and weird history. Note how keywords change from purple back to blue (what they were before semantic coloring was added):

**(1) Use punctuation.section.embedded for format specifiers**. This aligns with how Typescript colors formatting directives:

<img width="238" alt="Screen Shot 2020-05-09 at 10 54 01 AM" src="https://user-images.githubusercontent.com/1369240/81481258-93b5f280-91e3-11ea-99c2-c6d258c5bcad.png">

**(2) Consistently use `entity.name.type.*` scopes for type names**. Avoid using `entity.name.*` which gets colored like a keyword.

**(3) Use Property instead of Member for fields**. Property and Member are very similar, but if you look at the TextMate fallback scopes, it's clear that Member is intended for function-like-things (methods?) and Property is intended for variable-like-things.

**(4) Color `for` as a regular keyword when it's part of `impl Trait for Struct`**.

**(5) Use `variable.other.constant` for constants instead of `entity.name.constant`**. In the latest VSCode insiders, variable.other.constant has a subtly different color that differentiates constants from ordinary variables. It looks close to the green of types but it's not the same---it's a new color recently added to take advantage of semantic coloring.

I also made some minor changes that make the TextMate scopes better match the semantic scopes. The effect of this for the user is you observe less of a change when semantic coloring "activates". You can see the changes I made relative to the built-in TextMate grammar here:

https://github.com/rust-analyzer/rust-analyzer/pull/4397/files/a91d15c80c337dd1afb0eddd5eb048010d098ac7..97428b6d52d25f810dbd7d7a8d787740c58bfbd2#diff-6966c729b862f79f79bf7258eb3e0885

Co-authored-by: George Fraser <george@fivetran.com>
4 years agoMerge #4403
bors[bot] [Mon, 11 May 2020 17:25:34 +0000 (17:25 +0000)]
Merge #4403

4403: Check client capabilities before sending progress notifications r=kjeremy a=kjeremy

Fixes #4384

Co-authored-by: Jeremy Kolb <kjeremy@gmail.com>
4 years agoCheck client capabilities before sending progress notifications
Jeremy Kolb [Sat, 9 May 2020 21:15:22 +0000 (17:15 -0400)]
Check client capabilities before sending progress notifications

Fixes #4384

4 years agoMerge #4424
bors[bot] [Mon, 11 May 2020 17:16:26 +0000 (17:16 +0000)]
Merge #4424

4424: Use RA_LOG instead of RUST_LOG for logging r=matklad a=matklad

RUST_LOG might be set up for debugging the user's problem, slowing
down rust-analyzer considerably. That's the same reason why rustc uses
RUSTC_LOG.

bors r+
🤖

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
4 years agoUse RA_LOG instead of RUST_LOG for logging
Aleksey Kladov [Mon, 11 May 2020 17:14:12 +0000 (19:14 +0200)]
Use RA_LOG instead of RUST_LOG for logging

RUST_LOG might be set up for debugging the user's problem, slowing
down rust-analyzer considerably. That's the same reason why rustc uses
RUSTC_LOG.

4 years agoadd tests module snippet
Benjamin Coenen [Mon, 11 May 2020 16:11:23 +0000 (18:11 +0200)]
add tests module snippet

Signed-off-by: Benjamin Coenen <5719034+bnjjj@users.noreply.github.com>
4 years agoMerge #4421
bors[bot] [Mon, 11 May 2020 12:21:08 +0000 (12:21 +0000)]
Merge #4421

4421: Find references to a function outside module r=flodiebold a=montekki

Fixes #4188

Yet again, it looks like although the code in
https://github.com/rust-analyzer/rust-analyzer/blob/da1f316b0246ce41d7cb8560181e294089f06ef3/crates/ra_ide_db/src/search.rs#L128-L132

may be wrong, it is not hit since the `vis` is `None` at this point. The fix is similar to the #4237 case: just add another special case to `Definition::visibility()`.

Co-authored-by: Fedor Sakharov <fedor.sakharov@gmail.com>
4 years agoNew definition_visibility method
Fedor Sakharov [Mon, 11 May 2020 11:28:14 +0000 (14:28 +0300)]
New definition_visibility method

4 years agoAlso for consts and type aliases
Fedor Sakharov [Mon, 11 May 2020 10:52:20 +0000 (13:52 +0300)]
Also for consts and type aliases

4 years agoFind references to a function outside module
Fedor Sakharov [Mon, 11 May 2020 09:25:18 +0000 (12:25 +0300)]
Find references to a function outside module

4 years agoMerge #4419
bors[bot] [Sun, 10 May 2020 23:09:27 +0000 (23:09 +0000)]
Merge #4419

4419: :arrow_up: ra_vfs r=matklad a=matklad

Fix a critical bug where \r\n line endings would accidentally sneak in
after in-memory overlay removal.

bors r+
🤖

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
4 years ago:arrow_up: ra_vfs
Aleksey Kladov [Sun, 10 May 2020 22:52:11 +0000 (00:52 +0200)]
:arrow_up: ra_vfs

Fix a critical bug where \r\n line endings would accidentally sneak in
after in-memory overlay removal.

4 years agoPut sigil back to keyword.operator
George Fraser [Sun, 10 May 2020 22:36:47 +0000 (15:36 -0700)]
Put sigil back to keyword.operator

4 years agoChange lifetimes back to keyword-ish, tweak builtins for consistency between TextMate...
George Fraser [Sun, 10 May 2020 20:32:42 +0000 (13:32 -0700)]
Change lifetimes back to keyword-ish, tweak builtins for consistency between TextMate and semantic

4 years agoColor `for` as a regular keyword when it's part of impl _ for _
George Fraser [Sun, 10 May 2020 18:26:19 +0000 (11:26 -0700)]
Color `for` as a regular keyword when it's part of impl _ for _

4 years agoColor `in` as a control keyword
George Fraser [Sun, 10 May 2020 18:08:32 +0000 (11:08 -0700)]
Color `in` as a control keyword

4 years agoColor `as` as a keyword
George Fraser [Sun, 10 May 2020 18:01:56 +0000 (11:01 -0700)]
Color `as` as a keyword

4 years agoNo longer true
George Fraser [Sat, 9 May 2020 20:00:06 +0000 (13:00 -0700)]
No longer true

4 years agoColor core types as types, not keywords
George Fraser [Sat, 9 May 2020 19:57:32 +0000 (12:57 -0700)]
Color core types as types, not keywords

4 years agoColor sigil like keyword
George Fraser [Sat, 9 May 2020 19:34:28 +0000 (12:34 -0700)]
Color sigil like keyword

4 years agoColor lifetimes like types
George Fraser [Sat, 9 May 2020 19:32:08 +0000 (12:32 -0700)]
Color lifetimes like types

4 years agoImport built-in textmate grammar, with no changes
George Fraser [Sat, 9 May 2020 19:24:59 +0000 (12:24 -0700)]
Import built-in textmate grammar, with no changes

4 years agoUse Property instead of Member for fields
George Fraser [Sat, 9 May 2020 17:24:57 +0000 (10:24 -0700)]
Use Property instead of Member for fields

4 years agoTweak the textmate fallback scopes to be consistent with builtin TextMate grammar...
George Fraser [Sat, 9 May 2020 17:23:32 +0000 (10:23 -0700)]
Tweak the textmate fallback scopes to be consistent with builtin TextMate grammar and other languages

4 years agoResolve TODO about macro 2.0 def
veetaha [Sun, 10 May 2020 19:08:06 +0000 (22:08 +0300)]
Resolve TODO about macro 2.0 def

4 years agoFix typo
veetaha [Sun, 10 May 2020 18:59:15 +0000 (21:59 +0300)]
Fix typo

4 years agoCarify on a semicolon in macro call
veetaha [Sun, 10 May 2020 18:57:49 +0000 (21:57 +0300)]
Carify on a semicolon in macro call

4 years agoResolve TODO about curly-braced constructions in expression statement
veetaha [Sun, 10 May 2020 18:50:24 +0000 (21:50 +0300)]
Resolve TODO about curly-braced constructions in expression statement

4 years agoRemove TODO about Block since it was removed
veetaha [Sun, 10 May 2020 18:46:26 +0000 (21:46 +0300)]
Remove TODO about Block since it was removed

4 years agoResolve todos about refs and empty statements
veetaha [Sun, 10 May 2020 18:44:14 +0000 (21:44 +0300)]
Resolve todos about refs and empty statements

4 years agoConverted TODO about MacroItems to FIXME as per edwin0cheng
veetaha [Sun, 10 May 2020 18:06:12 +0000 (21:06 +0300)]
Converted TODO about MacroItems to FIXME as per edwin0cheng

4 years agoVerified ConstArg example, waiting for response on what `=` sign pertains to
veetaha [Sun, 10 May 2020 18:02:10 +0000 (21:02 +0300)]
Verified ConstArg example, waiting for response on what `=` sign pertains to

4 years agoMerge #4396
bors[bot] [Sun, 10 May 2020 18:01:20 +0000 (18:01 +0000)]
Merge #4396

4396: Improve panic message for ast_from_text r=jonas-schievink a=edwin0cheng

Related: #4368

Co-authored-by: Edwin Cheng <edwin0cheng@gmail.com>
4 years agoCorrecy use tree and type args docs
veetaha [Sun, 10 May 2020 17:52:25 +0000 (20:52 +0300)]
Correcy use tree and type args docs

4 years agoMerge #4394 #4414
bors[bot] [Sun, 10 May 2020 17:47:27 +0000 (17:47 +0000)]
Merge #4394 #4414

4394: Simplify r=matklad a=Veetaha

4414: Highlighting improvements r=matklad a=matthewjasper

- `static mut`s are highlighted as `mutable`.
- The name of the macro declared by `macro_rules!` is now highlighted.

Co-authored-by: veetaha <veetaha2@gmail.com>
Co-authored-by: Matthew Jasper <mjjasper1@gmail.com>
4 years agoFix "show syntax tree" command
veetaha [Sun, 10 May 2020 17:43:48 +0000 (20:43 +0300)]
Fix "show syntax tree" command

@matlkad please don't forget to keep it up-to-date!

4 years agoMerge #4406 #4410 #4411 #4417
bors[bot] [Sun, 10 May 2020 17:37:07 +0000 (17:37 +0000)]
Merge #4406 #4410 #4411 #4417

4406: Update cargo-metadata r=matklad a=edwin0cheng

This PR update `cargo-metadata` to  0.10.0 and it also relax the` serde-derive` deps to 1.0 for tests in `proc-macro-srv`.

cc @robojumper

r= @matklad  , I think you would have something to say related to https://github.com/serde-rs/json/issues/647#issue-593788429 ?

4410: Improve wording in comment r=matklad a=edwin0cheng

4411: do not remove then block when you unwrap else block #4361 r=matklad a=bnjjj

close #4361

4417: Omit default types in HirDisplay SourceCode mode r=matklad a=TimoFreiberg

Closes #4390

Co-authored-by: Edwin Cheng <edwin0cheng@gmail.com>
Co-authored-by: Benjamin Coenen <5719034+bnjjj@users.noreply.github.com>
Co-authored-by: Timo Freiberg <timo.freiberg@gmail.com>
4 years agoMerge #4418
bors[bot] [Sun, 10 May 2020 17:28:59 +0000 (17:28 +0000)]
Merge #4418

4418: Refactor protocol handling r=matklad a=matklad

bors r+
🤖

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
4 years agoreq -> lsp_ext
Aleksey Kladov [Sun, 10 May 2020 17:25:37 +0000 (19:25 +0200)]
req -> lsp_ext

4 years agoDon't re-export lsp_types
Aleksey Kladov [Sun, 10 May 2020 17:24:02 +0000 (19:24 +0200)]
Don't re-export lsp_types

4 years agoCorrect `use` cannot have type args as per flodiebold
veetaha [Sun, 10 May 2020 17:23:29 +0000 (20:23 +0300)]
Correct `use` cannot have type args as per flodiebold

4 years agoCorrect path docs and add colon2 token to Path ast node
veetaha [Sun, 10 May 2020 16:59:48 +0000 (19:59 +0300)]
Correct path docs and add colon2 token to Path ast node

4 years agoBetter fn signature
Aleksey Kladov [Sun, 10 May 2020 17:14:02 +0000 (19:14 +0200)]
Better fn signature