Aramis Razzaghipour
b4cddc0705
Highlight foreign modules as such
2021-05-24 14:54:16 +10:00
Aramis Razzaghipour
c32428571c
Remove hir krate methods
2021-05-24 14:54:16 +10:00
Aramis Razzaghipour
4fd5248749
Add highlighting of items from other crates
2021-05-24 14:53:48 +10:00
bors[bot]
495c9586ec
Merge #8945
...
8945: fix: Make expected type work in more situations r=flodiebold a=flodiebold
Also makes call info show the correct types for generic methods.
![2021-05-23-182952_1134x616_scrot](https://user-images.githubusercontent.com/906069/119269023-dd5a5b00-bbf5-11eb-993a-b6e122c3b9a6.png )
![2021-05-23-183117_922x696_scrot](https://user-images.githubusercontent.com/906069/119269025-dfbcb500-bbf5-11eb-983c-fc415b8428e0.png )
Co-authored-by: Florian Diebold <flodiebold@gmail.com>
2021-05-23 21:55:51 +00:00
Florian Diebold
b8262099cc
Get rid of field_type again
2021-05-23 23:54:35 +02:00
bors[bot]
a2ce091fd7
Merge #8953
...
8953: feat: generate getter avoids generating types like `&Vec<T>` r=matklad a=matklad
bors r+
🤖
Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2021-05-23 21:17:20 +00:00
Aleksey Kladov
479a7387c2
feat: generate getter avoids generating types like &Vec<T>
2021-05-24 00:15:23 +03:00
Jonas Schievink
693325fc39
internal: document ItemTree design
2021-05-23 23:09:38 +02:00
Kirill Bulatov
b5f524c7ff
Don't discover workspaces when detached files are given
2021-05-24 00:09:24 +03:00
bors[bot]
951c0e95f4
Merge #8948
...
8948: feat: generate getter assist places the cursor at the generated function r=matklad a=matklad
bors r+
🤖
Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2021-05-23 20:48:35 +00:00
Aleksey Kladov
8696c82777
feat: generate getter assist places the cursor at the generated function
2021-05-23 23:43:33 +03:00
Aleksey Kladov
8d5f59e0f1
minor: align import style with styleguide
2021-05-23 23:40:19 +03:00
Kirill Bulatov
72594beca4
Deal with todos
2021-05-23 23:37:59 +03:00
Aleksey Kladov
af54b1e248
minimize tests
2021-05-23 23:19:00 +03:00
Aleksey Kladov
c06599504b
remove duplicate tests
2021-05-23 23:15:54 +03:00
Aleksey Kladov
4c8259e210
reduce duplication
2021-05-23 23:13:35 +03:00
Kirill Bulatov
2ca2e24a39
Do not add cargo target for detached files only project
2021-05-23 23:10:05 +03:00
Andy Russell
a90b9a5872
implement range formatting
2021-05-23 15:50:36 -04:00
Kirill Bulatov
de090749d9
Drag detached files towards loading
2021-05-23 22:46:20 +03:00
Kirill Bulatov
695569d978
Draft detached files retrieval
2021-05-23 22:46:20 +03:00
Lukas Tobias Wirth
da74c66947
Correctly resolve crate name in use paths when import shadows itself
2021-05-23 19:37:01 +02:00
Aleksey Kladov
7283163bb9
Minor: fix comment style
...
See https://github.com/rust-analyzer/rust-analyzer/blob/master/docs/dev/style.md#documentation
2021-05-23 19:50:23 +03:00
Florian Diebold
e65803748d
Infer correct expected type in closure
...
Sadly currently only works if the closure body isn't completely missing.
2021-05-23 18:45:44 +02:00
Florian Diebold
7a0c93c58a
Infer correct expected type for generic struct fields
2021-05-23 18:45:44 +02:00
Florian Diebold
4a6cdd776d
Record method call substs and use them in call info
2021-05-23 18:24:21 +02:00
Jonas Schievink
11825ac5fe
Explain why nested TypeRef
aren't interned
2021-05-23 16:28:23 +02:00
Aramis Razzaghipour
4d4dbcfead
Give ‘unsafe’ semantic token modifier to unsafe traits
2021-05-23 21:45:10 +10:00
bors[bot]
0ec4ce1e9b
Merge #8938
...
8938: internal: Fix #8931 r=flodiebold a=flodiebold
- and add some better checking for similar bugs
Co-authored-by: Florian Diebold <flodiebold@gmail.com>
2021-05-23 11:03:18 +00:00
Florian Diebold
34a3bc4196
Paper over #8931 a bit more
...
The problem was the skipping of binders in
`resolve_method_call_as_callable`; this still doesn't use the _correct_
substitution, but at least it doesn't return a type with free variables
in it.
Fixes #8931 .
2021-05-23 13:00:14 +02:00
Florian Diebold
a5d85a6356
Add test for #8931 and better checking
2021-05-23 12:52:41 +02:00
Jonas Schievink
15ff7faf3d
Render where clauses and more generic params
2021-05-23 02:51:58 +02:00
Jonas Schievink
380293d6c2
Pretty-print generic parameters
2021-05-23 01:15:26 +02:00
Jonas Schievink
c22ccd07fe
ItemTree: pretty-print all paths
2021-05-23 00:37:15 +02:00
Florian Diebold
a88c7c04d2
Add last remaining module docstring
2021-05-22 16:39:56 +02:00
bors[bot]
a99de65573
Merge #8923
...
8923: Add even more docs r=matklad a=matklad
bors r+
🤖
Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2021-05-22 14:20:42 +00:00
Aleksey Kladov
dc1577d58d
Add even more docs
2021-05-22 17:20:22 +03:00
bors[bot]
d56e52402e
Merge #8922
...
8922: Add more docs r=matklad a=matklad
bors r+
🤖
Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2021-05-22 13:54:13 +00:00
Aleksey Kladov
188b0f96f9
Add more docs
2021-05-22 16:53:47 +03:00
bors[bot]
542337eca4
Merge #8868
...
8868: internal: replace AstTransformer with mutable syntax trees r=matklad a=matklad
Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2021-05-22 13:30:32 +00:00
Aleksey Kladov
e6776c3e1b
use more precise name
2021-05-22 16:23:07 +03:00
bors[bot]
057e2ed574
Merge #8921
...
8921: Resolve any lifetime variables to 'static after inference r=flodiebold a=flodiebold
Chalk's unification can sometimes create lifetime variables, which we
currently don't really deal with, but at least we don't want to leak
them outside of inference.
Should fix #8919 .
Co-authored-by: Florian Diebold <flodiebold@gmail.com>
2021-05-22 12:32:12 +00:00
Aleksey Kladov
47d7434dde
internal: replace AstTransformer with mutable syntax trees
2021-05-22 15:27:32 +03:00
Florian Diebold
63614aafad
Resolve any lifetime variables to 'static after inference
...
Chalk's unification can sometimes create lifetime variables, which we
currently don't really deal with, but at least we don't want to leak
them outside of inference.
Should fix #8919 .
2021-05-22 14:27:22 +02:00
bors[bot]
7d81e40e36
Merge #8901
...
8901: fix: `fill_match_arms` hangs on a tuple of large enums r=matklad a=iDawer
+ Lazy computation of missing arms.
+ Convenience function to test lazy computation: `ide_assists::tests::check_assist_unresolved`.
Fixes #8835
Co-authored-by: Dawer <7803845+iDawer@users.noreply.github.com>
2021-05-22 12:26:40 +00:00
Jonas Schievink
d077b8a7e0
Work around non-unique AttrIds
2021-05-22 02:30:03 +02:00
Jonas Schievink
271ec6b990
Add a "Debug ItemTree" LSP request
2021-05-21 23:59:52 +02:00
Jonas Schievink
8d13864440
Add an ItemTree pretty-printer
2021-05-21 23:45:27 +02:00
Jonas Schievink
01df4c04d1
impl Display for AttrInput/ImportAlias
2021-05-21 23:45:09 +02:00
Jonas Schievink
45f4a1e559
Remove StructDefKind
2021-05-21 21:08:06 +02:00
bors[bot]
edbde25ca2
Merge #8856
...
8856: Use Chalk for unification r=flodiebold a=flodiebold
- use Chalk's unification, get rid of our own `unify`
- rewrite coercion to not use unification internals and to be more analogous to rustc
- fix various coercion bugs
- rewrite handling of obligations, since the old hacky optimization where we noted when an inference variable changes wasn't possible anymore
- stop trying to deeply resolve types all the time during inference, instead only do it shallowly where necessary
Co-authored-by: Florian Diebold <flodiebold@gmail.com>
2021-05-21 17:51:53 +00:00