Jonas Schievink
59d4640b64
Remove unneeded HirFileId argument
2020-06-24 16:54:21 +02:00
Jonas Schievink
f9a1a9cd3c
Merge item tree traits
...
The Source trait isn't needed anymore since we no longer merge
extern crate items with use items.
2020-06-24 16:53:56 +02:00
Jonas Schievink
689e147c9d
Collect inner items in expression macros
2020-06-24 16:53:54 +02:00
Jonas Schievink
4b03b39d5b
draw the rest of the owl
2020-06-24 16:53:16 +02:00
Jonas Schievink
34bc80650b
Hook up query, add impls, lower moar
2020-06-24 16:52:37 +02:00
Aleksey Kladov
1d75d11d6c
Start item tree
2020-06-24 16:52:37 +02:00
robojumper
cc6ba84c40
fmt
2020-05-31 12:06:22 +02:00
robojumper
1cd78a3355
correctly infer labelled breaks
2020-05-31 11:40:18 +02:00
robojumper
367487fe88
Support raw_ref_op's raw reference operator
2020-05-28 21:42:22 +02:00
Aleksey Kladov
ecac5d7de2
Switch to new magic marks
2020-05-20 13:02:53 +02:00
Edwin Cheng
12a3bf3c31
Create LowerCtx on the fly
2020-05-17 23:37:30 +08:00
bors[bot]
756e91732b
Merge #4305
...
4305: Favor types for record type struct in name resolution r=matklad a=edwin0cheng
Fixed #4235
Co-authored-by: Edwin Cheng <edwin0cheng@gmail.com>
2020-05-05 15:06:41 +00:00
Benjamin Coenen
831bb1cf91
refactor: use attrsOwner directly in is_cfg_enabled
...
Signed-off-by: Benjamin Coenen <5719034+bnjjj@users.noreply.github.com>
2020-05-05 09:34:07 +02:00
Edwin Cheng
e921195d93
Change favor_types to has_constructor
2020-05-05 01:15:27 +08:00
Edwin Cheng
5ae18f4f81
Remove unused import
2020-05-05 00:34:54 +08:00
Edwin Cheng
8d96db3417
Favor types for Record in name resolution
2020-05-05 00:17:22 +08: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
Aleksey Kladov
4f2134cc33
Introduce EffectExpr
2020-05-02 11:21:39 +02:00
Aleksey Kladov
fd030f9450
Revert "Merge #4233 "
...
This reverts commit a5f2b16366
, reversing
changes made to c96b2180c1
.
2020-05-02 01:12:37 +02: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
Aleksey Kladov
292ba6a1f8
Remove dead code, which elaborately pretends to be alive
2020-04-30 22:41:14 +02:00
Benjamin Coenen
b87b335e68
add support for cfg feature attributes on expression #4063
...
Signed-off-by: Benjamin Coenen <5719034+bnjjj@users.noreply.github.com>
2020-04-25 15:48:04 +02:00
Jeremy Kolb
d7f3d858ad
Some clippy fixes
2020-04-19 15:15:49 -04:00
bors[bot]
179d983535
Merge #4012
...
4012: fix panic on ellipsis in pattern r=flodiebold a=JoshMcguigan
fixes #3999
Co-authored-by: Josh Mcguigan <joshmcg88@gmail.com>
2020-04-17 12:39:20 +00:00
Josh Mcguigan
408f914bf4
fix panic on ellipsis in pattern
2020-04-17 05:36:44 -07:00
Aleksey Kladov
302bf97bbf
Don't expose impl details of SyntaxPtr
2020-04-17 12:25:41 +02:00
Josh Mcguigan
ee822d19b7
handle tuple patterns with ellipsis
2020-04-13 08:19:19 -07:00
Aleksey Kladov
5e5eb6a108
Align grammar for record patterns and literals
...
The grammar now looks like this
[name_ref :] pat
2020-04-12 00:00:15 +02:00
bors[bot]
fd06fe7b13
Merge #3925
...
3925: Implement assist "Reorder field names" r=matklad a=geoffreycopin
This PR implements the "Reorder record fields" assist as discussed in issue #3821 .
Adding a `RecordFieldPat` variant to the `Pat` enum seemed like the easiest way to handle the `RecordPat` children as a single sequence of elements, maybe there is a better way ?
Co-authored-by: Geoffrey Copin <copin.geoffrey@gmail.com>
2020-04-11 18:40:46 +00:00
Aleksey Kladov
0aece75cdd
Remove dead code
2020-04-11 19:36:31 +02:00
Geoffrey Copin
270bcfdfc2
Avoid adding a RecordFieldPat variant to the Pat enum
2020-04-11 19:30:41 +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
Aleksey Kladov
deb40d52aa
Align naming
2020-04-11 17:20:26 +02:00
Aleksey Kladov
e9519e1035
Pull Expander up
2020-04-11 17:09:50 +02:00
Aleksey Kladov
6b0870d12e
Simplify
2020-04-11 17:00:31 +02:00
Aleksey Kladov
c1244c853c
Forward compat
2020-04-11 00:27:00 +02:00
Josh Mcguigan
e63315b8f1
add record pat missing field diagnostic
2020-04-10 06:35:52 -07:00
Geoffrey Copin
730a927c5e
Implement assist "Reorder field names"
2020-04-10 00:57:03 +02:00
Aleksey Kladov
30084a56a5
Simpler acessors for keywords
2020-04-09 23:42:01 +02:00
Aleksey Kladov
00ec0c1066
use uniform accessor
2020-04-09 23:19:51 +02:00
bors[bot]
33df20868d
Merge #3918
...
3918: Add support for feature attributes in struct literal r=matklad a=bnjjj
As promised here is the next PR to solve 2 different scenarios with feature flag on struct literal.
close #3870
Co-authored-by: Benjamin Coenen <5719034+bnjjj@users.noreply.github.com>
2020-04-09 19:27:06 +00:00
Benjamin Coenen
c1317d6923
feat: add support for feature attributes in struct literal
...
Signed-off-by: Benjamin Coenen <5719034+bnjjj@users.noreply.github.com>
2020-04-09 19:12:50 +02:00
Aleksey Kladov
2bfb65db93
Be consistent about token accesors
2020-04-09 18:48:13 +02:00
Benjamin Coenen
fc70cf9458
feat: add support for feature attributes in struct literal
...
Signed-off-by: Benjamin Coenen <5719034+bnjjj@users.noreply.github.com>
2020-04-09 18:32:02 +02:00
Aleksey Kladov
689661c959
Scale back to only two traits
2020-04-09 13:00:09 +02:00
Luca Barbieri
60f4d7bd8c
Provide more complete AST accessors to support usage in rustc
2020-04-09 11:50:37 +02:00
Aleksey Kladov
da8eb29a2f
Macro patterns are not confused with expressions.
...
We treat macro calls as expressions (there's appropriate Into impl),
which causes problem if there's expresison and non-expression macro in
the same node (like in the match arm).
We fix this problem by nesting macor patterns into another node (the
same way we nest path into PathExpr or PathPat). Ideally, we probably
should add a similar nesting for macro expressions, but that needs
some careful thinking about macros in blocks: `{ am_i_expression!() }`.
2020-04-03 16:12:38 +02:00
Josh Mcguigan
d0b6b2ee2f
lower bool literal with the value from source code rather than default bool value
2020-04-01 04:47:41 -07:00
Josh Mcguigan
a9d0c9b2a4
lower literal patterns
2020-04-01 04:18:46 -07:00