Lukas Wirth
576e3a4e12
add_explicit_type
respects coercions
2021-07-10 18:19:46 +02:00
Lukas Wirth
95c8c65139
Nest all the or-patterns!
2021-06-17 17:37:14 +02:00
Maan2003
c9b4ac5be4
clippy::redudant_borrow
2021-06-13 09:24:16 +05:30
bors[bot]
5f592f4f58
Merge #9191
...
9191: fix: Don't descend MacroCall TokenTree delimiters r=jonas-schievink a=Veykril
Fixes #9190
Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
2021-06-09 13:17:38 +00:00
Lukas Wirth
3c40b15d62
Don't descend MacroCall TokenTree delimiters
2021-06-09 15:02:11 +02:00
Lukas Wirth
1d74ef1d98
Don't complete values in type position
2021-06-08 16:50:10 +02:00
Jonas Schievink
33be5762e5
Attempt to track attr macros during highlighting
2021-06-07 19:32:28 +02:00
Jonas Schievink
33e747d786
Make "expand macro" command work with attribute macros
2021-06-07 16:05:36 +02:00
Jonas Schievink
8d87f9b298
Handle attribute macros in descend_into_macros
2021-06-06 17:03:37 +02:00
Jonas Schievink
33debc4065
Update salsa
2021-05-27 15:05:41 +02:00
Aleksey Kladov
45112aa8c0
internal: rename hypothetical -> speculative
...
Lets steal this good naming from Roslyn before I forget about it yet
again.
2021-05-24 22:21:25 +03:00
Florian Diebold
b8262099cc
Get rid of field_type again
2021-05-23 23:54:35 +02:00
Florian Diebold
4a6cdd776d
Record method call substs and use them in call info
2021-05-23 18:24:21 +02: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
Lukas Tobias Wirth
d97a4b8e49
Support goto_type_definition for types
2021-05-06 17:05:49 +02:00
cynecx
28ef7c20d7
hir_ty: deal with TypeRef::Macro in HirFormatter
2021-04-17 16:24:56 +02:00
cynecx
cf3b4f1e20
hir_ty: Expand macros at type position
2021-04-17 16:24:56 +02:00
Florian Diebold
69714d36e6
Hide Binders internals more
2021-04-05 19:19:18 +02:00
Lukas Wirth
444f6caaba
Resolve associated types
2021-04-01 21:31:25 +02:00
Edwin Cheng
4520002b63
Unleash macro 2.0 in hightlight and more
2021-03-27 14:42:49 +08:00
cynecx
5ff3299dd6
syntax: return owned string instead of leaking string
2021-03-26 18:30:59 +01:00
Lukas Wirth
cbd325707b
Track labels in scopes
2021-03-21 01:02:01 +01:00
Jonas Schievink
759f8c83e5
Make ItemTreeId
its own type
2021-03-18 01:53:22 +01:00
bors[bot]
0fbfab3b45
Merge #8059
...
8059: Move doc-comment highlight injection from AST to HIR r=matklad,jonas-schievink a=Veykril
Fixes #5016
Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
2021-03-17 11:13:54 +00:00
Matthias Krüger
966c23f529
avoid converting types into themselves via .into() (clippy::useless-conversion)
...
example: let x: String = String::from("hello world").into();
2021-03-17 01:27:56 +01:00
Lukas Wirth
11e9bc60a2
Move doc-comment highlight injection from AST to HIR
2021-03-16 18:57:47 +01:00
Aleksey Kladov
f5a81ec468
Upgrade rowan
...
Notably, new rowan comes with support for mutable syntax trees.
2021-03-16 16:10:49 +03:00
Lukas Wirth
2e3c156b0e
Return multiple modules in parent_module
2021-03-15 15:15:40 +01:00
Aleksey Kladov
e346a9c5e1
Remove useless code_model indirection
2021-03-08 22:08:30 +03:00
Aleksey Kladov
05729fd3c4
For unresolved macros, hightlight only the last segment
2021-02-28 14:29:10 +03:00
Jonas Schievink
216dc856c5
Wrap BuiltinType
in code model
2021-02-11 19:52:33 +01:00
Lukas Wirth
bed12833cc
Show const params in completions
2021-01-19 20:06:39 +01:00
Lukas Wirth
cb863390f2
Handle self/super/crate in PathSegment as NameRef
2021-01-15 19:21:23 +01:00
Lukas Wirth
0acdb73076
Add ConstParams to the HIR
2021-01-01 10:06:42 +01:00
Lukas Wirth
262b9c3982
Track labels in the HIR
2020-12-24 12:49:40 +01:00
Aleksey Kladov
f6ed16674c
Align code_model name with ungrammar
2020-12-20 10:05:24 +03:00
Aleksey Kladov
2ae31e34b1
Rename ImplDef -> Impl
...
We used to have `Def` suffix for all symbols, but we moved off from
that. `FunctionDef` isn't better than `Function`. Looks like we've
forgot to change `Impl` though!
2020-12-17 14:36:15 +03:00
Lukas Wirth
dd496223f5
Node-ify lifetimes
2020-12-16 14:16:09 +01:00
Jonas Schievink
c1cb595382
Move to upstream macro_rules!
model
2020-12-15 15:37:37 +01:00
Lukas Wirth
c6172f3f6d
Add LifetimeParam resolving to Semantics
2020-12-14 16:04:28 +01:00
Aleksey Kladov
4015ff0e0b
Improve code structure
...
Make sure that there's only one entry point, analyze, remove awkard
analyzer2 name
2020-12-11 17:06:21 +03:00
Jonas Schievink
4943ef085d
Make original_range
a method on InFile<&SyntaxNode>
2020-12-08 19:01:27 +01:00
Aleksey Kladov
fcc3c49013
Apply suggestions from code review
...
Co-authored-by: Laurențiu Nicola <lnicola@users.noreply.github.com>
2020-09-21 15:35:42 +03:00
Aleksey Kladov
2c916bbc18
Document SemanticScope
2020-09-21 12:30:55 +02:00
Pavan Kumar Sunkara
4d97f5f037
Rename record_field_pat to record_pat_field
2020-09-10 18:56:04 +02:00
Aleksey Kladov
863b1fb731
⬆️ ungrammar
2020-08-21 19:14:05 +02:00
Aleksey Kladov
61754678fb
Better API factoring around self access modes
2020-08-19 17:02:50 +02:00
Aleksey Kladov
b9b4693ce3
Add SelfParam to code_model
2020-08-19 15:16:24 +02:00
Aleksey Kladov
a3b0a3aeb8
Minor cleanups
2020-08-19 13:46:34 +02:00
Paul Daniel Faria
3456e2eec7
Add new method to Semantics, method_receiver_kind, which returns the kind of self
...
The options are Shared, Mutable, Consuming, and Copied. Use this to add proper
highlighting to methods based on usage.
2020-08-16 10:26:16 -04:00