Jonas Schievink
7c9b3d154c
Remove entries_without_primitives
2020-06-30 14:06:23 +02:00
Jonas Schievink
a80e8fea85
Simplify entry API usage
2020-06-30 13:54:40 +02:00
Jonas Schievink
56fb8a401a
Reorder imports
2020-06-30 13:25:15 +02:00
Jonas Schievink
0fcbc716fd
Split namespace maps in ItemScope
...
Reduces memory usage of the CrateDefMap query by ~130 MB on r-a.
2020-06-30 13:23:42 +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
bors[bot]
656cbc68a1
Merge #5033
...
5033: Order of glob imports should not affect import shadowing r=Nashenas88 a=Nashenas88
Fixes #5032
Co-authored-by: Paul Daniel Faria <Nashenas88@users.noreply.github.com>
2020-06-27 02:51:54 +00:00
Paul Daniel Faria
1f5d30ff16
Replace simple is_named with matches macro
2020-06-26 22:51:13 -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
Paul Daniel Faria
b700443e78
Remove comment that's no longer valid
2020-06-26 11:13:58 -04:00
Paul Daniel Faria
76755ce176
Split glob import map to per-ns, switch ExprCollector to use a simpler push_res
2020-06-26 11:11:51 -04:00
Jonas Schievink
72fe70f2f8
Make VFS join methods fallible
2020-06-26 16:30:50 +02:00
Paul Daniel Faria
de9e964e4a
Track import type outside of , use enum rather than bool to improve readability
2020-06-25 12:42:12 -04:00
Jonas Schievink
dad2f75b91
Use ItemTree to answer enum_data query
2020-06-25 16:52:47 +02:00
Jonas Schievink
563d585594
Use IdRange for variants
2020-06-25 16:52:15 +02:00
Jonas Schievink
b06214d164
Generalize FieldIds -> IdRange<T>
2020-06-25 16:42:59 +02:00
Jonas Schievink
2a8fc9e682
adt.rs: fetch struct/union data from item tree
2020-06-25 16:41:08 +02:00
Paul Daniel Faria
0b657ddbfe
Revert resolution of all glob imports first, replace with tracking of glob imports and shadowing when more specific
2020-06-25 09:27:00 -04:00
Paul Daniel Faria
70d4829560
Order of glob imports should not affect import shadowing
2020-06-25 09:23:34 -04:00
Jonas Schievink
d84b3ff6a1
Collect field/variant attrs in ItemTree
2020-06-25 14:39:27 +02:00
Jonas Schievink
9ba7726579
Allow iterating fields in the ItemTree
2020-06-25 13:50:27 +02:00
Jonas Schievink
2928600374
Reorder items
2020-06-24 16:54:21 +02:00
Jonas Schievink
d6fd7809b0
Clean up and fix inner item collection a bit
2020-06-24 16:54:21 +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
d4ddec2bdf
Shrink arenas after building ItemTree
2020-06-24 16:54:21 +02:00
Jonas Schievink
94169ee504
ItemTree: Use more boxed slices
2020-06-24 16:54:21 +02:00
Jonas Schievink
abdba92334
Don't allocate empty generics
2020-06-24 16:54:21 +02:00
Jonas Schievink
43cad21623
Don't allocate common visibilities
2020-06-24 16:54:20 +02:00
Jonas Schievink
16fd4dabb7
Remove file id from item tree
...
It's not needed, and `source` is only used by tests anyways
2020-06-24 16:53:56 +02:00
Jonas Schievink
c019002d17
Slightly reduce ItemTree memory footprint
2020-06-24 16:53:56 +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
b5fd02d93c
Generate ModItem via macro
2020-06-24 16:53:56 +02:00
Jonas Schievink
20ff1cdcfb
Address more comments
2020-06-24 16:53:56 +02:00
Jonas Schievink
a0ad457575
if let else -> match
2020-06-24 16:53:56 +02:00
Jonas Schievink
ae7a296c85
Unify and test attribute handling
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
ffa0435050
Make generics and attr queries use ItemTree
...
Now it's fast
2020-06-24 16:53:16 +02:00
Jonas Schievink
19586bc5c6
Record HirFileId's in profiler
2020-06-24 16:53:16 +02:00
Jonas Schievink
1fbe21a545
Make remaining item data queries use item tree
2020-06-24 16:53:16 +02:00
Jonas Schievink
4b03b39d5b
draw the rest of the owl
2020-06-24 16:53:16 +02:00
Jonas Schievink
b94caeb88b
ItemTree: Make clonable and add AST access
2020-06-24 16:53:16 +02:00
Jonas Schievink
c12f7b610b
Lower generics
2020-06-24 16:53:16 +02:00