Aleksey Kladov
05729fd3c4
For unresolved macros, hightlight only the last segment
2021-02-28 14:29:10 +03:00
Jonas Schievink
6990b89b26
Restrict visibilities to the containing DefMap
2021-02-28 04:47:38 +01:00
Jonas Schievink
338823f73a
is_visible_from_def_map: handle block expressions
2021-02-23 17:56:16 +01:00
Jonas Schievink
216dc856c5
Wrap BuiltinType
in code model
2021-02-11 19:52:33 +01:00
Jonas Schievink
85906aa304
Remove unneeded return
2021-02-09 18:40:05 +01:00
Jonas Schievink
51f68863b1
Remove pub
2021-02-09 17:36:10 +01:00
Jonas Schievink
e16d9dc5bd
Use block_def_map
in Resolver
...
This required a few changes to not bail out immediately if a
`ModuleScope` doesn't resolve a path.
The `LocalItemsScope` hack is now removed.
2021-02-09 17:27:04 +01:00
Jonas Schievink
34ad3d629a
Teach find_path
about inner items
2021-02-09 17:25:03 +01:00
Jonas Schievink
7067a22e1c
Add another block def map test
2021-02-09 17:24:43 +01:00
Jonas Schievink
b9c213da7a
Make with_ancestor_maps
public
2021-02-09 17:23:25 +01:00
Jonas Schievink
27f77060e2
Add TestDB::module_at_position
2021-02-09 17:22:57 +01:00
Jonas Schievink
1956286368
Add expression scopes for blocks
2021-02-09 17:11:44 +01:00
Jonas Schievink
c312ab51d0
Test super
resolution too
2021-02-05 19:25:50 +01:00
Jonas Schievink
997bd97b77
Fix resolution of self
module within blocks
2021-02-05 19:24:03 +01:00
Yoshua Wuyts
79d103d5b4
Remove redundant clones
2021-02-05 16:57:26 +01:00
Jonas Schievink
6239fe4730
Fix merging of segment_index
in path resolution
2021-02-05 15:14:33 +01:00
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