Aleksey Kladov
5c594bcb48
cleanup casts
2019-07-19 18:22:00 +03:00
Aleksey Kladov
f9d9e0a1f7
several highlighting cleanups
...
* make stuff more type-safe by using `BindPat` instead of just `Pat`
* don't add `mut` into binding hash
* reset shadow counter when we enter a function
2019-07-19 16:09:32 +03:00
Aleksey Kladov
e2b28f5bb8
migrate ra_hir to the new rowan
2019-07-19 13:16:25 +03:00
Ekaterina Babshukova
2a1e11b36f
complete fields in enum variants
2019-07-12 20:31:49 +03:00
Aleksey Kladov
deab4caa7b
make Parse fields private
...
this is in preparation for the new rowan API
2019-07-12 19:41:13 +03:00
Aleksey Kladov
1834bae5b8
allow rustfmt to reorder imports
...
This wasn't a right decision in the first place, the feature flag was
broken in the last rustfmt release, and syntax highlighting of imports
is more important anyway
2019-07-04 23:09:09 +03:00
Florian Diebold
9c5e7dd849
Implement autoderef using the Deref trait
...
- add support for other lang item targets, since we need the Deref lang item
2019-06-15 18:21:23 +02:00
Aleksey Kladov
0145d06515
use Source for module, part 1
2019-06-11 18:28:51 +03:00
Aleksey Kladov
caefa6982b
remove some hacks from nameresolution for macros
2019-06-08 20:42:02 +03:00
Aleksey Kladov
780e1a365b
somewhat better name
2019-06-08 18:38:14 +03:00
Aleksey Kladov
1b783e33e9
one macro def should be enough
2019-06-08 14:48:56 +03:00
Alan Du
40424d4222
Fix clippy::identity_conversion
2019-06-04 18:05:07 -04:00
Edwin Cheng
371961be0e
Improve goto definition for MBE
2019-06-01 19:34:19 +08:00
Aleksey Kladov
c8bcfe6a05
fix syntax errors in tests
2019-05-28 18:07:39 +03:00
Aleksey Kladov
9cba67b2ad
simplify
2019-05-12 23:03:37 +03:00
Aleksey Kladov
98531dc785
simplify
2019-05-12 22:51:03 +03:00
bors[bot]
aa7bdfd37f
Merge #1208
...
1208: [WIP] Goto for Macro's r=matklad a=Lapz
Adds goto definition for macros. Currently only works for macros in the current crate ~~otherwise it panics~~. Proper macro resolution needs to be added for it to resolve macros in other crates.
Todo
- [X] Allow goto from macro calls
- [X] Fix panics
- [x] Add tests
![Screen Recording 2019-04-25 at 18 00 24](https://user-images.githubusercontent.com/19998186/56754499-1dd01c00-6785-11e9-9e9a-1e36de70cfa3.gif )
Co-authored-by: Lenard Pratt <l3np27@gmail.com>
2019-05-04 18:38:10 +00:00
Lenard Pratt
8198e13c26
Added local macro goto
2019-05-04 17:39:51 +01:00
Florian Diebold
f43e69a64e
Handle recursive types in canonicalization
2019-05-04 18:25:36 +02:00
Florian Diebold
0ad7317b24
Canonicalize before doing method resolution
2019-05-04 18:18:30 +02:00
Aleksey Kladov
e01052d1f0
move auto-imoprter into IDE
...
auto-import is purely an IDE concern, so it should be done outside of
HIR
2019-04-22 15:56:28 +03:00
Andrea Pretto
200032852b
complete_import: prevent panic when the anchor is the completion source range
...
(fix rebase mess)
Please enter the commit message for your changes. Lines starting
2019-04-22 00:48:43 +02:00
Andrea Pretto
9144214958
complete_import: add new import resolver infrastructure with some hardcoded importable name.
...
Changes complete_scope to support that.
2019-04-22 00:14:58 +02:00
Florian Diebold
4f8a49f43c
Refactor method candidate generation a bit
...
This fixes the order in which candidates are chosen a bit (not completely
though, as the ignored test demonstrates), and makes autoderef work with trait
methods. As a side effect, this also makes completion of trait methods work :)
2019-04-14 21:53:35 +02:00
Aleksey Kladov
2facb5e061
cleanups
2019-04-13 14:16:46 +03:00
Aleksey Kladov
b260641e0c
slight encapsulation
2019-04-13 11:29:47 +03:00
Aleksey Kladov
f9e825d956
move ScopeEntryWithSyntax
2019-04-13 11:24:09 +03:00
Aleksey Kladov
d387bdccba
drop obsolete fixme
2019-04-13 11:21:32 +03:00
Aleksey Kladov
62d01dd4df
hide resolver
2019-04-13 11:00:15 +03:00
Aleksey Kladov
f4a94e74bc
fold ScopeWithSyntax into SourceAnalyzer
2019-04-13 10:49:01 +03:00
Aleksey Kladov
1e8569dce9
make private
2019-04-13 09:46:39 +03:00
Aleksey Kladov
d4043a8dba
only def-with-body remains
2019-04-13 09:45:52 +03:00
Aleksey Kladov
d88269bc2d
generalize
2019-04-13 09:38:37 +03:00
Aleksey Kladov
17a0e22883
simplify
2019-04-13 09:36:28 +03:00
Aleksey Kladov
65b0073653
simplify
2019-04-13 09:33:34 +03:00
Aleksey Kladov
9ead801a9c
make private
2019-04-13 09:32:25 +03:00
Aleksey Kladov
3aae223d93
hide some scopes
2019-04-13 09:31:03 +03:00
Aleksey Kladov
58fe5598e7
simplify
2019-04-13 01:32:43 +03:00
Aleksey Kladov
b0d8f9ff5d
make stuff private
2019-04-13 01:07:24 +03:00
Aleksey Kladov
81e91980dd
simplify
2019-04-13 01:05:18 +03:00
Aleksey Kladov
7c13e22334
simplify tests
2019-04-13 00:56:57 +03:00
Aleksey Kladov
0fd93bc14a
use really correct resolver for expressions
2019-04-13 00:44:47 +03:00
Aleksey Kladov
cf2ba2791d
add todo
2019-04-11 17:14:41 +03:00
Aleksey Kladov
a347208bb2
use correct resolver for expressions
2019-04-11 16:51:30 +03:00
Aleksey Kladov
ebb0c377f0
remove resolver from CompletonContext
2019-04-11 16:49:35 +03:00
Aleksey Kladov
5471c1ef4b
generalize SourceAnalyzer to handle all defs with bodies
2019-04-11 16:37:29 +03:00
Aleksey Kladov
07cc047b4f
minimize the API
2019-04-11 16:29:33 +03:00
Aleksey Kladov
b6809b6695
rename
2019-04-11 16:29:33 +03:00
Aleksey Kladov
10d66d63d7
introduce SourceAnalyzer
2019-04-11 16:29:33 +03:00
bors[bot]
fdbebccd71
Merge #1076
...
1076: Const body inference r=flodiebold a=Lapz
This is the second part of #887 . I've added type inference on const bodies and introduced the DefWithBody containing Function, Const and Static. I want to add tests but im unsure on how I would go about testing that completions work.
Co-authored-by: Lenard Pratt <l3np27@gmail.com>
2019-04-02 19:01:54 +00:00