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
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
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
ad254f4c97
Fix legacy macro resolution in block expressions
2021-01-27 19:16:39 +01:00
Jonas Schievink
98a88ebb9e
Intern block locations and handle them in ModuleId
2021-01-25 19:02:05 +01: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
Aleksey Kladov
e5c5c0a040
Include countme
crate to count important data structures.
2021-01-21 19:30:52 +03:00
Jonas Schievink
896dfacfc4
Add name resolution query for block expressions
2021-01-21 15:22:17 +01:00
Jonas Schievink
82146737ac
Treat BlockExpr as a potential module origin
2021-01-20 20:05:48 +01:00
Jonas Schievink
5f319ca7ee
DefMap: hide remaining crate-visible fields
2021-01-20 18:17:48 +01:00
Jonas Schievink
0587b99fde
Make public DefMap fields private
2021-01-20 15:41:18 +01:00
Jonas Schievink
57a82fb05b
Rename CrateDefMap
to DefMap
2021-01-18 20:18:05 +01:00
Aleksey Kladov
4c4e54ac8a
prepare to publish el libro de arena
2021-01-14 19:06:02 +03:00
Lukas Wirth
816190c6f6
Remove some unneeded string allocations
2020-12-31 10:13:14 +01:00
Laurențiu Nicola
42c24ff25f
Avoid a couple of allocations
2020-12-29 14:35:49 +02:00
Jonas Schievink
d171838d63
More accurately place proc-macro diagnostic
2020-11-27 16:29:40 +01:00
Jonas Schievink
0432aa0ed7
Publish diagnostics for macro expansion errors
2020-11-27 13:50:22 +01:00
Jonas Schievink
519d870c11
Don't store SyntaxNodePtr
in CrateDefMap
...
It is volatile across reparses and makes incrementality worse.
2020-11-26 17:29:09 +01:00
Jonas Schievink
3421b645e6
Emit better #[cfg] diagnostics
2020-10-22 19:19:18 +02:00
Jonas Schievink
4cb3cf352f
Rename UnconfiguredCode -> InactiveCode
2020-10-20 18:22:31 +02:00
Jonas Schievink
80d2741401
Add a (hint) diagnostic for unconfigured items
2020-10-20 17:53:04 +02:00
Aleksey Kladov
af4e75533f
Rename declaration_name -> display_name
...
Declaration names sounds like a name of declaration -- something you
can use for analysis. It empathically isn't, and is just a label
displayed in various UI. It's important not to confuse the two, least
we accidentally mix semantics with UI (I believe, there's already a
case of this in the FamousDefs at least).
2020-10-20 15:38:11 +02:00
Kirill Bulatov
9d19e5b962
Properly name the field
2020-10-02 21:38:22 +03:00
Jonas Schievink
2a9a66d254
Add diagnostic types for unresolved crates/imports
2020-09-16 17:26:51 +02:00
Aleksey Kladov
b28c54a2c2
Rename ra_hir_def -> hir_def
2020-08-13 16:29:33 +02:00