Aleksey Kladov
c83467796b
Finalize Trait grammar
2020-07-30 18:17:28 +02:00
Aleksey Kladov
3cd4112bdc
Finalize const&static grammar
2020-07-30 18:02:20 +02:00
Aleksey Kladov
609680ef97
Rename EnumDef -> Enum
2020-07-30 17:52:53 +02:00
Aleksey Kladov
216a5344c8
Rename StructDef -> Struct
2020-07-30 17:50:40 +02:00
Aleksey Kladov
1ae4721c9c
Finalize union grammar
2020-07-30 17:38:52 +02:00
Aleksey Kladov
6f8aa75329
Rename RecordLit -> RecordExpr
2020-07-30 16:21:30 +02:00
Aleksey Kladov
eb2f806344
Rename TypeAliasDef -> TypeAlias
2020-07-30 15:25:46 +02:00
Aleksey Kladov
1142112c70
Rename FnDef -> Fn
2020-07-30 15:16:05 +02:00
Aleksey Kladov
b1332670c7
Rename UseItem -> Use
2020-07-30 14:20:33 +02:00
Aleksey Kladov
d032f872b6
Finish extern crates grammar
2020-07-30 12:31:07 +02:00
Aleksey Kladov
6636f56e79
Rename ModuleItem -> Item
2020-07-30 00:23:03 +02:00
Paul Daniel Faria
28bb8ed9cb
Cleanup changes leftover from previous tracking attempt
2020-06-27 10:16:19 -04:00
Paul Daniel Faria
2fc92fa28c
Remove track_parent and parent_map, replace with simple walk in missign unsafe validator
2020-06-27 10:13:14 -04:00
Paul Daniel Faria
f78df42f81
Fix issues caused during rebase
2020-06-27 10:13:14 -04:00
Paul Daniel Faria
2608a6fd3a
unsafe: Clean up, improve tracking, add debug_assert
...
Move unsafe_expressions to unsafe_validation.rs, replace vec tracking of
child exprs with inline macro, add debug assert to ensure tracked
children match walked children exactly
2020-06-27 10:13:14 -04:00
Paul Daniel Faria
7f2219dc76
Track expr parents during lowering, use parent map when checking if unsafe exprs are within unsafe blocks
2020-06-27 10:10:26 -04:00
Paul Daniel Faria
b9569886a9
Rename Expr::UnsafeBlock to Expr::Unsafe
2020-06-27 10:10:26 -04:00
Paul Daniel Faria
278cbf12cd
Track unsafe blocks, don't trigger missing unsafe diagnostic when unsafe exprs within unsafe block
2020-06-27 10:10:26 -04:00
Jonas Schievink
efe378d2b4
Make find_inner_item fallible
...
The ItemTree does not collect incomplete items, such as traits with no
name, so the (malformed) AST node might have no corresponding item.
2020-06-26 18:07:31 +02:00
Jonas Schievink
7f6694b12e
find_inner_item: more detailed panic message
2020-06-26 18:02:41 +02:00
Jonas Schievink
5d7172f17e
Simplify inner item lowering
2020-06-26 17:30:27 +02:00
Jonas Schievink
3b50b0b2b6
Use a HashMap instead of Vec
...
This is no longer enforcing stack discipline, so a Vec isn't necessary
or helpful
2020-06-24 16:54:21 +02:00
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