Jonas Schievink
474df093a9
Avoid using ModPath's fields directly
2021-02-04 22:42:21 +01:00
Jonas Schievink
5d99ba1d9a
Make ModPath
's representation private
2021-02-04 20:49:24 +01:00
Jonas Schievink
003ee0086a
Intern TypeRef
s in the containing ItemTree
2021-02-04 19:23:56 +01:00
Jonas Schievink
cacaebcb33
Expander: store a LocalModuleId, not ModuleId
...
It already stores the DefMap containing the module, so having
a full ModuleId is unnecessary and makes it easier to mix things up
2021-02-04 15:04:21 +01:00
Jonas Schievink
26a2a2433c
Don't keep the parent DefMap alive via Arc
...
This seems like it could easily leak a lot of memory since we don't
currently run GC
2021-02-04 13:44:54 +01:00
Jonas Schievink
1a8ea81a79
Split out ItemScope::dump from DefMap::dump
2021-02-03 19:05:11 +01:00
bors[bot]
3ff2aa6d09
Merge #7546
...
7546: Add newline between block and crate maps r=jonas-schievink a=jonas-schievink
bors r+
Co-authored-by: Jonas Schievink <jonasschievink@gmail.com>
2021-02-03 17:25:06 +00:00
Jonas Schievink
6458f9107c
Add newline between block and crate maps
2021-02-03 18:23:59 +01:00
Jonas Schievink
eda1cb7ceb
Add a FIXME to ItemTree
2021-02-03 18:14:39 +01:00
Jonas Schievink
d4a22fc801
Update DefMap
and block_def_map
docs
2021-02-03 17:54:03 +01:00
Jonas Schievink
63744fe128
Test for name resolution with DefMap shortcut
2021-02-03 15:33:25 +01:00
Jonas Schievink
da57f5dc17
Shortcut block_def_map
if there's no inner items
...
This previously didn't work, but apparently only because of the wonky
test setup
2021-02-03 15:33:25 +01:00
Jonas Schievink
7eff6705cc
Use body lowering for block_def_map tests
...
Removes the hacky and buggy custom lowering code
2021-02-03 14:21:15 +01:00
Jonas Schievink
b7be2b1d3c
Use block_def_map in body lowering
2021-02-03 14:21:15 +01:00
Jonas Schievink
5914f86d47
Fix resolution of crate
paths from within blocks
...
They resolve to the crate root, not the DefMap's root module (which
can be a block)
2021-02-02 18:02:12 +01:00
Jonas Schievink
cd9659ffce
Use the right DefMap
when looking up modules
2021-02-02 12:36:38 +01:00
Jonas Schievink
7202ce6c96
Revert "Use block_def_map in body lowering"
2021-02-02 11:46:58 +01:00
Jonas Schievink
b4aa860cac
Shortcut block_def_map
if there's no inner items
...
This previously didn't work, but apparently only because of the wonky
test setup
2021-02-01 13:33:18 +01:00
Jonas Schievink
80ae583dc0
Use body lowering for block_def_map tests
...
Removes the hacky and buggy custom lowering code
2021-02-01 13:33:18 +01:00
Jonas Schievink
9cc7d57429
Use block_def_map in body lowering
2021-02-01 13:33:18 +01:00
bors[bot]
1a59f75cda
Merge #7503
...
7503: Return inner attributes of outline mod declarations in `attrs_query` r=jonas-schievink a=Veykril
Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
2021-01-31 20:13:28 +00:00
Lukas Wirth
999e020da2
Return inner attributes of outline mod declarations in attrs_query
2021-01-31 19:53:01 +01:00
Lukas Wirth
412f180d71
Honor #![macro_use] in mod source files
2021-01-31 19:33:02 +01:00
Jonas Schievink
090b2f0e50
Fix incorrect FileId
and remove broken shortcut
...
Apparently we were using the crate's root file instead of the file
containing the block.
2021-01-28 19:33:00 +01:00
Jonas Schievink
7177045a67
block_def_map: add a few macro tests
2021-01-28 18:53:35 +01:00
Jonas Schievink
232b75394e
Update original_module
when ascending DefMap
s
2021-01-28 18:27:27 +01:00
Jonas Schievink
2aebde6c0b
ItemTree: Treat items in MacroStmts
as top-level
2021-01-28 18:00:10 +01:00
Jonas Schievink
ad254f4c97
Fix legacy macro resolution in block expressions
2021-01-27 19:16:39 +01:00
Aleksey Kladov
181590412e
add more counts
2021-01-27 12:16:24 +03:00
Jonas Schievink
08253d5473
Traverse parent DefMap for super
paths
2021-01-25 19:15:39 +01:00
Jonas Schievink
98a88ebb9e
Intern block locations and handle them in ModuleId
2021-01-25 19:02:05 +01:00
bors[bot]
2c735ed734
Merge #7426
...
7426: Create all `ModuleId`s through a `DefMap` method r=jonas-schievink a=jonas-schievink
`ModuleId` needs to be able to represent blocks, and only the
associated `DefMap` will know how to construct that `ModuleId`
bors r+
Co-authored-by: Jonas Schievink <jonasschievink@gmail.com>
2021-01-25 14:22:24 +00:00
Jonas Schievink
5c241b0766
Create all ModuleId
s through a DefMap
method
...
`ModuleId` needs to be able to represent blocks, and only the
associated `DefMap` will know how to construct that `ModuleId`
2021-01-25 15:21:33 +01:00
Laurențiu Nicola
5ed5a542fb
Derive Default on ItemTree
2021-01-25 14:12:53 +02:00
Phil Ellison
8c7ccdc29d
Identify methods using functions ids rather than string names
2021-01-23 07:40:25 +00:00
bors[bot]
eab5db20ed
Merge #7391
...
7391: Fix error when using "extern crate self as" r=kazatsuyu a=kazatsuyu
Fix #6957
Co-authored-by: kazatsuyu <shirayama.kazatsuyu@gmail.com>
2021-01-23 04:04:09 +00:00
Jonas Schievink
3de8f57c51
Make ModuleId
's krate
field private
2021-01-22 18:09:55 +01:00
Jonas Schievink
ce29730bc7
Obtain ModuleId
's DefMap
through a method
2021-01-22 16:33:58 +01:00
kazatsuyu
90d6740e32
Add mark::check! and mark::hit!
2021-01-23 00:11:37 +09:00
kazatsuyu
0fb4544403
cargo fmt
2021-01-22 22:52:04 +09:00
kazatsuyu
e52589e3a7
Fix error when using "extern crate self as"
2021-01-22 22:28:45 +09:00
Daiki Ihara
f5b97e52c9
Fix broken link in intra-doc
2021-01-22 20:06:45 +09:00
Jonas Schievink
8916b0c6cb
Remove unused field
2021-01-21 21:12:26 +01:00
Jonas Schievink
4d19607057
Add test for path resolution bug
2021-01-21 20:35:36 +01:00
Jonas Schievink
3f4f253028
Revert "Make use of block_def_map
in body lowering"
2021-01-21 19:04:31 +01:00
bors[bot]
e76d8c1d9a
Merge #7378
...
7378: Include `countme` crate to count important data structures. r=matklad a=matklad
Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2021-01-21 17:46:44 +00:00
Jonas Schievink
cdb0e25aaa
Make use of block_def_map
in body lowering
...
Removes the `local_scope` hack from `Expander` in favor of tracking the
`DefMap` in use during body lowering
2021-01-21 18:05:52 +01:00
Aleksey Kladov
e5c5c0a040
Include countme
crate to count important data structures.
2021-01-21 19:30:52 +03:00
Jonas Schievink
d157a03e93
Remove unnecessary annotations from tests
2021-01-21 17:19:46 +01:00
Jonas Schievink
4e603b7947
Add test for nameres in nested blocks
2021-01-21 16:42:56 +01:00