Aleksey Kladov
72e229fcb3
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.
2020-05-11 19:16:00 +02:00
Benjamin Coenen
4e54b1ca46
add tests module snippet
...
Signed-off-by: Benjamin Coenen <5719034+bnjjj@users.noreply.github.com>
2020-05-11 18:11:23 +02:00
bors[bot]
05399250d4
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
da1f316b02/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>
2020-05-11 12:21:08 +00:00
Fedor Sakharov
3d66aa0542
New definition_visibility method
2020-05-11 14:28:14 +03:00
Fedor Sakharov
753e1e679c
Also for consts and type aliases
2020-05-11 13:52:20 +03:00
Fedor Sakharov
762ec9581a
Find references to a function outside module
2020-05-11 12:25:18 +03:00
George Fraser
63b75a40c8
Color for
as a regular keyword when it's part of impl _ for _
2020-05-10 13:11:14 -07:00
George Fraser
3f1c73633e
Color in
as a control keyword
2020-05-10 13:07:28 -07:00
George Fraser
cff0d6b6e6
Use Property instead of Member for fields
2020-05-10 13:07:28 -07:00
veetaha
2a5ab9f5dd
Resolve TODO about macro 2.0 def
2020-05-10 22:08:06 +03:00
veetaha
73c6bc4dbd
Fix typo
2020-05-10 21:59:15 +03:00
veetaha
33f240960d
Carify on a semicolon in macro call
2020-05-10 21:57:49 +03:00
veetaha
a1dc28f236
Resolve TODO about curly-braced constructions in expression statement
2020-05-10 21:51:53 +03:00
veetaha
8a298eed7a
Resolve todos about refs and empty statements
2020-05-10 21:44:14 +03:00
veetaha
f5e2e02aa9
Converted TODO about MacroItems to FIXME as per edwin0cheng
2020-05-10 21:06:12 +03:00
veetaha
71f2be968b
Verified ConstArg example, waiting for response on what =
sign pertains to
2020-05-10 21:02:21 +03:00
bors[bot]
bfb40a698d
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>
2020-05-10 18:01:20 +00:00
veetaha
f6fd4c4a74
Correcy use tree and type args docs
2020-05-10 20:52:25 +03:00
bors[bot]
74e72e9afa
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>
2020-05-10 17:47:27 +00:00
bors[bot]
a3dbd272e0
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>
2020-05-10 17:37:07 +00:00
bors[bot]
348cbc054c
Merge #4418
...
4418: Refactor protocol handling r=matklad a=matklad
bors r+
🤖
Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2020-05-10 17:28:59 +00:00
Aleksey Kladov
3bec2be9de
req -> lsp_ext
2020-05-10 19:27:12 +02:00
Aleksey Kladov
bec3bf701c
Don't re-export lsp_types
2020-05-10 19:24:02 +02:00
veetaha
2af6b4b67e
Correct use
cannot have type args as per flodiebold
2020-05-10 20:23:29 +03:00
veetaha
a19b164661
Correct path docs and add colon2 token to Path ast node
2020-05-10 20:21:46 +03:00
Aleksey Kladov
a78e1573b1
Better fn signature
2020-05-10 19:14:02 +02:00
Aleksey Kladov
bd8422643a
to_proto::semantic_tokens
2020-05-10 19:09:22 +02:00
Aleksey Kladov
1586bab0b9
Simplify proto conversion
...
Trait based infra in conv.rs is significantly more complicated than
what we actually need here.
2020-05-10 19:01:26 +02:00
veetaha
eedf11ae88
Add example with const in TypeBound as per flodiebold
2020-05-10 19:24:06 +03:00
veetaha
09c438b47e
Properly document const impl as per flodiebold
2020-05-10 19:17:46 +03:00
veetaha
7a49165f5d
Remove MacroStmts as per edwin0cheng
2020-05-10 19:11:22 +03:00
Timo Freiberg
cbbbd48325
Omit default types in HirDisplay SourceCode mode
2020-05-10 18:10:15 +02:00
veetaha
258a3461b4
Add proper docs for TokenTree as per edwin0cheng
2020-05-10 19:09:36 +03:00
veetaha
3554866d67
Run codegen of ast types with documentation
2020-05-10 19:06:28 +03:00
Matthew Jasper
22b75c4cea
Highlight the name in macro declarations
2020-05-10 16:25:51 +01:00
Matthew Jasper
11c0a5bb60
Highlight mutable statics as mutable
2020-05-10 16:25:51 +01:00
Timo Freiberg
e17193dc51
Expand fixture documentation a little
2020-05-10 16:51:12 +02:00
Timo Freiberg
66db88d226
Trigger change_visibility assist when on an invisible struct field
...
Union fields apparently don't work :(
2020-05-10 16:51:12 +02:00
Emil Lauridsen
85d44cad45
infer: Make expected rhs type for plain assign the lhs type
...
This fixes an issue where the following code sample would fail to infer
the type contained in the option:
```rust
fn main() {
let mut end = None; // TODO: Fix inference for this in RA
loop {
end = Some(true);
}
}
```
2020-05-10 16:24:04 +02:00
Benjamin Coenen
98a7bb2435
do not remove then block when you unwrap else block #4361
...
Signed-off-by: Benjamin Coenen <5719034+bnjjj@users.noreply.github.com>
2020-05-10 15:31:51 +02:00
Timo Freiberg
7568d07709
Trigger change_visibility assist when on a path to an invisible def
2020-05-10 13:54:04 +02:00
Benjamin Coenen
92b2230fef
add if let and while let postfix for Option and Result
...
Signed-off-by: Benjamin Coenen <5719034+bnjjj@users.noreply.github.com>
2020-05-10 12:45:35 +02:00
Benjamin Coenen
e80903a965
Merge branch 'master' of github.com:rust-analyzer/rust-analyzer into feat_4348
2020-05-10 12:31:55 +02:00
Edwin Cheng
a3375c1a88
Remove dbg
2020-05-10 18:03:44 +08:00
Edwin Cheng
9405116d51
Hot fix panic for function_signature
2020-05-10 16:27:31 +08:00
Edwin Cheng
3de3b52f10
Remove dbg
2020-05-10 06:39:36 +08:00
Edwin Cheng
2400d70442
Update cargo-metadata
2020-05-10 06:22:26 +08:00
Edwin Cheng
0f1d39133c
Improve panic message for ast_from_text
2020-05-10 03:46:12 +08:00
veetaha
2f7c30c515
Simplify match
2020-05-09 22:20:11 +03:00
veetaha
a42729a59d
Simplify crate graph creation
2020-05-09 21:26:59 +03:00