Jonas Schievink
f085e592fe
Measure memory usage of ImportMap
2020-06-05 13:10:43 +02:00
Paul Daniel Faria
a9cb2933fb
Add highlight support for unsafe fn calls and raw ptr deref
2020-06-02 18:54:00 -04:00
bors[bot]
94889b6472
Merge #4592
...
4592: fix textedit range returned for completion when left token is a keyword r=bnjjj a=bnjjj
close #4545
Co-authored-by: Benjamin Coenen <5719034+bnjjj@users.noreply.github.com>
2020-05-27 13:22:26 +00:00
kjeremy
bee4f8f9fe
Pass trivially copy types as copy
2020-05-26 14:12:13 -04:00
Benjamin Coenen
0e814a3b5f
fix textedit range returned for completion when left token is a keyword #4545
...
Signed-off-by: Benjamin Coenen <5719034+bnjjj@users.noreply.github.com>
2020-05-24 16:47:35 +02:00
Benjamin Coenen
c6143742bd
add support of feature flag for runnables #4464
...
Signed-off-by: Benjamin Coenen <5719034+bnjjj@users.noreply.github.com>
2020-05-21 10:48:42 +02:00
Hasan Ali
bb78d314e1
Add doc comment for resolve_hir_path_qualifier
2020-05-16 20:40:58 +01:00
Hasan Ali
001a86dc03
Fix completion and hover for module and function of same name
2020-05-16 01:09:04 +01:00
Florian Diebold
3f42b2e837
Handle Self
in values and patterns
...
I.e.
- `Self(x)` or `Self` in tuple/unit struct impls
- `Self::Variant(x)` or `Self::Variant` in enum impls
- the same in patterns
Fixes #4454 .
2020-05-15 17:25:28 +02:00
Fedor Sakharov
ccd5268374
Ty -> Type
2020-05-14 13:53:45 +03:00
Fedor Sakharov
12bf008ab1
Adds a param_idx helper
2020-05-14 13:47:36 +03:00
Fedor Sakharov
a55ad20388
Use generic_defaults and display_source_code
2020-05-14 09:56:20 +03:00
Fedor Sakharov
00f3b6c59a
Correctly fill default type parameters
2020-05-13 16:07:44 +03: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
Matthew Jasper
11c0a5bb60
Highlight mutable statics as mutable
2020-05-10 16:25:51 +01:00
Timo Freiberg
fe93675e8a
New HirDisplay method for displaying sourcecode
2020-05-08 17:12:18 +02:00
Edwin Cheng
92665358cd
Rename ImplItem to AssocItem
2020-05-05 23:56:10 +08:00
Kirill Bulatov
fee74851b0
Propose custom derives in completion
2020-05-02 22:24:27 +03:00
bors[bot]
fb8fb65131
Merge #4234
...
4234: Support local_inner_macros r=jonas-schievink a=edwin0cheng
This PR implements `#[macro_export(local_inner_macros)]` support.
Note that the rustc implementation is quite [hacky][1] too. :)
[1]: 614f273e93/src/librustc_resolve/macros.rs (L456)
Co-authored-by: Edwin Cheng <edwin0cheng@gmail.com>
2020-05-02 10:30:49 +00:00
Edwin Cheng
44f5e2048c
Remove lower_path from AssistCtx to Semantic
2020-05-01 20:05:12 +08:00
Edwin Cheng
bdcf6f5658
Introduce LowerCtx for path lowering
2020-05-01 20:01:17 +08:00
Edwin Cheng
e4267967a8
Support local_inner_macros
2020-05-01 11:23:03 +08:00
Jonas Schievink
15233a467d
?
2020-04-30 00:10:30 +02:00
Jonas Schievink
cafa7a780a
Use or-patterns more
2020-04-30 00:10:30 +02:00
Jonas Schievink
3e41483932
Remove .clone()
2020-04-30 00:10:30 +02:00
Jonas Schievink
3cb73da949
Rename to associated_type_shorthand_candidates
2020-04-30 00:10:30 +02:00
Jonas Schievink
8c2670026a
Complete assoc. items on type parameters
2020-04-30 00:10:30 +02:00
Jonas Schievink
8cb139090f
Complete union fields after dot
2020-04-28 22:45:46 +02:00
Jonas Schievink
76d6f54471
Don't add call parens when an fn type is expected
2020-04-25 22:18:57 +02:00
Aleksey Kladov
970dbf8717
Rename StructField -> Field
2020-04-25 14:23:34 +02:00
Aleksey Kladov
b1d5817dd1
Convert code to text-size
2020-04-25 11:59:18 +02:00
Kirill Bulatov
ce06a6b422
Do not add default and closure types in 'add explicit type' assist
2020-04-21 22:56:40 +03:00
Aleksey Kladov
fa2ea8f494
Fix goto definition for record patterns
2020-04-18 22:11:49 +02:00
bors[bot]
98819d8919
Merge #4029
...
4029: Fix various proc-macro bugs r=matklad a=edwin0cheng
This PRs does the following things:
1. Fixed #4001 by splitting `LIFETIME` lexer token to two mbe tokens. It is because rustc token stream expects `LIFETIME` as a combination of punct and ident, but RA `tt:TokenTree` treats it as a single `Ident` previously.
2. Fixed #4003 , by skipping `proc-macro` for completion. It is because currently we don't have `AstNode` for `proc-macro`. We would need to redesign how to implement `HasSource` for `proc-macro`.
3. Fixed a bug how empty `TokenStream` merging in `proc-macro-srv` such that no L_DOLLAR and R_DOLLAR will be emitted accidentally.
Co-authored-by: Edwin Cheng <edwin0cheng@gmail.com>
2020-04-18 17:56:54 +00:00
Edwin Cheng
f78de3bb95
Ignore proc-macro in completion
2020-04-18 19:26:54 +08:00
Aleksey Kladov
f178df1a5e
Don't use SyntaxNodePtr::range when determining scope for offset
2020-04-17 18:04:49 +02:00
Aleksey Kladov
a8196ffe84
Correctly highlight ranges of diagnostics from macros
...
closes #2799
2020-04-17 13:56:38 +02:00
Josh Mcguigan
6be972770e
diagnostics cli, iterate over members
2020-04-14 16:26:03 -07:00
Aleksey Kladov
0aece75cdd
Remove dead code
2020-04-11 19:36:31 +02:00
Aleksey Kladov
7a39bc3ba2
Make records grammar more orthogonal
...
We used
name [: expr]
grammar before, now it is
[name :] expr
which makes things simpler
2020-04-11 19:20:41 +02:00
Josh Mcguigan
e63315b8f1
add record pat missing field diagnostic
2020-04-10 06:35:52 -07:00
Aleksey Kladov
4c29214bba
Move computation of missing fields into hir
2020-04-07 18:34:17 +02:00
Josh Mcguigan
8c378af721
missing match arms diagnostic
2020-04-07 05:12:08 -07:00
Aleksey Kladov
baf9fcc38e
Merge pull request #3866 from lnicola/fewer-braces
...
Fix unnecessary braces warnings
2020-04-07 09:22:33 +02:00
Aleksey Kladov
bf569f8b29
Check for eprintln on CI
2020-04-06 17:00:18 +02:00
Laurențiu Nicola
52fd2c8e48
Fix unnecessary braces warnings
2020-04-06 17:21:33 +03:00
Matthew Hall
6a2127be28
Cleanup checking for existing impls in impl From assist
...
Use the trait solver to check if there's an existing implementation of
From<type_in_enum_variant> for the enum.
2020-04-02 18:42:30 +01:00
Matthew Hall
1fee60181f
Add impl From for enum variant assist
...
Basically adds a From impl for tuple enum variants with one field. Added
to cover the fairly common case of implementing your own Error that can
be created from another one, although other use cases exist.
2020-04-01 22:26:41 +01:00
Aleksey Kladov
9f53cec1da
Cleanup memory usage stats
2020-03-25 19:35:46 +01:00