Evgenii P
6a94f203fc
Use std::future::Future trait from stdlib
2019-08-03 17:07:20 +07:00
Evgenii P
ab7774545c
Use future lang item instead of hardcoded std::future::Future
2019-08-03 01:53:51 +07:00
Evgenii P
30bc3b93be
rustfmt
2019-08-03 01:16:20 +07:00
Evgenii P
c417b98f02
Implement completion for the .await syntax
2019-08-03 01:15:43 +07:00
Ekaterina Babshukova
8e49bb664a
show local variable types in completion
2019-07-23 19:26:27 +03:00
Ekaterina Babshukova
5fe19d2fbd
provide completion in struct patterns
2019-07-21 14:41:33 +03:00
Aleksey Kladov
f3bdbec1b6
rename range -> text_range
2019-07-20 12:58:27 +03:00
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
Lenard Pratt
88e22e9d70
Added const bodies and static body to the ast
...
and added inference the inference test
reduce code duplication
2019-04-02 19:21:36 +01:00
Aleksey Kladov
9e213385c9
switch to new rowan
2019-04-01 12:06:24 +03:00
Aleksey Kladov
e28db444df
rename
2019-03-26 19:11:01 +03:00
Aleksey Kladov
fb8b354dcc
add typed ids
2019-03-26 17:25:14 +03:00
Aleksey Kladov
f6f2d69bb8
simplify
2019-03-26 14:54:05 +03:00
Aleksey Kladov
0b820cacab
move source_id to a separate file
2019-03-26 14:42:28 +03:00
Aleksey Kladov
4fd8cfd6ad
replace todo with fixme
2019-03-23 11:07:09 +03:00
Aleksey Kladov
b2a6c17362
remove lower module
2019-03-17 12:52:52 +03:00
Aleksey Kladov
2195d1db6d
Replace module_tree with CrateDefMap
2019-03-17 12:49:07 +03:00
Ville Penttinen
4a0bb3d7c5
Add support for goto definition and hover on Self
...
This fixes #943
2019-03-07 17:34:44 +02:00
Aleksey Kladov
80bb7d86ec
align lower module query names
2019-03-02 16:49:06 +03:00
Aleksey Kladov
12e3b4c70b
reformat the world
2019-02-08 14:49:43 +03:00
Florian Diebold
c5852f422f
Some cleanup and additional tests
2019-02-01 23:24:26 +01:00
Florian Diebold
d3df80dfe4
Cleanup
2019-02-01 22:54:21 +01:00
Florian Diebold
afce8e4426
Use the new Resolver API for goto def
2019-02-01 22:45:43 +01:00
Florian Diebold
33ff7b56ff
Use the new Resolver API in completion
2019-02-01 22:45:25 +01:00
Florian Diebold
5208c2aa93
Sketching the resolver API
2019-02-01 22:14:34 +01:00
kjeremy
f0fdc9d5c0
Go To Implementation for Trait
2019-01-31 18:34:52 -05:00
Aleksey Kladov
ef7eb8c257
Use Crate instead of CrateId
2019-01-30 22:37:20 +03:00
Jeremy Kolb
3c17643b30
Go to Implementation for structs and enums
2019-01-29 19:13:02 -05:00
Aleksey Kladov
a128075af9
remove Option<SourceFileItemId> hack
2019-01-26 23:27:01 +03:00
Aleksey Kladov
9457b1f0e6
rename source_file -> parse
2019-01-26 11:51:36 +03:00
Aleksey Kladov
0f2f3a21e7
Migrate trait & type to new ids
2019-01-25 01:31:32 +03:00
Aleksey Kladov
f588535273
remove boilerplate
2019-01-25 00:32:37 +03:00
Aleksey Kladov
ec7ed054e0
Functions use new id scheme
2019-01-24 15:28:50 +03:00
Aleksey Kladov
3ab1519cb2
Change ids strategy
...
this is a part of larghish hir refactoring which aims to
* replace per-source-root module trees with per crate trees
* switch from a monotyped DedId to type-specific ids
2019-01-24 13:29:19 +03:00
Aleksey Kladov
59f830d3e8
assign DefIds when lowering
2019-01-23 19:49:11 +03:00
Aleksey Kladov
63f7dadc11
rename LoweredImport -> ImportId
2019-01-19 15:37:25 +03:00
gfreezy
5c8cb56506
move rename to a new mod
2019-01-19 15:36:58 +03:00
Aleksey Kladov
11f3c8afb2
remove Cancelable from source binders
2019-01-15 18:13:49 +03:00
Aleksey Kladov
68ff52566d
remove Cancelable from module_tree_query
2019-01-15 17:55:15 +03:00
Marcus Klaas de Vries
0b8fbb4fad
Fix typos in ARCHITECTURE.md and a number of crates
...
specifically: gen_lsp_server, ra_arena, ra_cli, ra_db, ra_hir
2019-01-09 01:17:09 +01:00
Aleksey Kladov
702bdacb03
move node at offset to aglo already
2019-01-08 21:01:41 +03:00
Aleksey Kladov
fa6e0b0d38
itroduce trait for ast tokens
2019-01-08 12:23:10 +03:00
Aleksey Kladov
da0b348ae9
migrate ra_hir to rowan 2.0
2019-01-08 11:28:42 +03:00
Aleksey Kladov
8a3b489c2f
kill module source
2019-01-06 20:01:26 +03:00
Aleksey Kladov
fd4456d0ec
flatten module structure
2019-01-06 17:36:10 +03:00
Aleksey Kladov
8c4d277036
switch source-binders to Module
2019-01-06 17:35:29 +03:00
Florian Diebold
e5a6cf8153
Various small code review improvements
2019-01-06 00:38:08 +01:00
Florian Diebold
a6f33b4ca5
Add test for invalidation of inferred types when typing inside function
...
This currently fails, but should work once we have hir::Expr.
2019-01-05 22:41:12 +01:00
Aleksey Kladov
d61707b4e1
index stuff produced by macros
2019-01-03 21:29:17 +03:00
Aleksey Kladov
37ed2f35ba
rename MFileId -> HirFileId
2019-01-02 00:09:54 +03:00
Aleksey Kladov
289391e163
use MFile
2019-01-01 22:15:35 +03:00
Aleksey Kladov
e066050671
use names everywhere
2018-12-27 21:21:10 +03:00
Aleksey Kladov
49e746b010
completion uses hir scopes
2018-12-22 11:01:03 +03:00
Aleksey Kladov
1c5ce7a868
File module source does not depend on syntax
2018-12-19 01:51:05 +03:00
Aleksey Kladov
159525b120
Check Fileid in SourceFileMap
2018-12-09 13:18:46 +03:00
Aleksey Kladov
db456749a8
make stuff private
2018-12-05 13:20:11 +03:00
Aleksey Kladov
4344264024
move fuzzy source binding to a separete mode
2018-12-05 13:16:20 +03:00