Aleksey Kladov
fac7b0e252
Don't guess macro expansion crate
2020-06-11 12:13:14 +02:00
Benjamin Coenen
c6143742bd
add support of feature flag for runnables #4464
...
Signed-off-by: Benjamin Coenen <5719034+bnjjj@users.noreply.github.com>
2020-05-21 10:48:42 +02: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
bdcf6f5658
Introduce LowerCtx for path lowering
2020-05-01 20:01:17 +08:00
veetaha
f52e2f6840
Fix typo
2020-04-25 20:49:51 +03:00
Aleksey Kladov
302bf97bbf
Don't expose impl details of SyntaxPtr
2020-04-17 12:25:41 +02:00
Aleksey Kladov
0aece75cdd
Remove dead code
2020-04-11 19:36:31 +02:00
Aleksey Kladov
7a39bc3ba2
Make records grammar more orthogonal
...
We used
name [: expr]
grammar before, now it is
[name :] expr
which makes things simpler
2020-04-11 19:20:41 +02:00
Aleksey Kladov
38c67e5c0d
Avoid cyclic queries in name resolution when processing enums
2020-04-11 17:52:26 +02:00
Aleksey Kladov
deb40d52aa
Align naming
2020-04-11 17:20:26 +02:00
Aleksey Kladov
e9519e1035
Pull Expander up
2020-04-11 17:09:50 +02:00
Aleksey Kladov
6b0870d12e
Simplify
2020-04-11 17:00:31 +02:00
Aleksey Kladov
c1244c853c
Forward compat
2020-04-11 00:27:00 +02:00
Edwin Cheng
92cc6c9816
Add recursive limit in expression macro expansion
2020-03-21 23:58:47 +08:00
Aleksey Kladov
f840fcb2f5
Simplify Arena to use a generic index
2020-03-19 18:46:30 +01:00
Aleksey Kladov
9faea2364d
Use dyn Trait
for working with databse
...
It improves compile time in `--release` mode quite a bit, it doesn't
really slow things down and, conceptually, it seems closer to what we
want the physical architecture to look like (we don't want to
monomorphise EVERYTHING in a single leaf crate).
2020-03-16 17:42:30 +01:00
Edwin Cheng
fe78a14bbb
Support local macro_rules
2020-03-14 14:25:51 +08:00
Aleksey Kladov
57da3df99a
Explicitly remember desugard pats
2020-03-06 15:17:48 +01:00
Aleksey Kladov
5ffddc4b92
Explicitly remember desugard exprs
2020-03-06 15:11:05 +01:00
Aleksey Kladov
fb5891c433
Source map returns a result
...
cc #2236
2020-03-06 14:44:44 +01:00
Edwin Cheng
2d4e79e1e6
Introduce AsMacroCall trait
2020-02-17 12:57:24 +08:00
Edwin Cheng
12cc2ed557
Use pre-stored macro file
2019-12-23 21:56:10 +08:00
Edwin Cheng
16156d766d
Add macro call support for type_of
2019-12-23 13:19:01 +08:00
Aleksey Kladov
baee746185
Share impl Scope between modules and blocks
2019-12-22 15:52:35 +01:00
Aleksey Kladov
d4b135f38c
Optimize and profile
2019-12-21 18:46:21 +01:00
bors[bot]
6eab968c60
Merge #2624
...
2624: Separate module item from module scope r=matklad a=matklad
bors r+
Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2019-12-20 19:51:03 +00:00
Edwin Cheng
ad81d1dbc1
Add support macros in impl blocks
2019-12-21 03:37:03 +08:00
Aleksey Kladov
0f212b3798
Move ModuleScope to a new module
2019-12-20 16:52:02 +01:00
Aleksey Kladov
3d4b48e481
Fix resolve for field init shorthand
2019-12-20 14:48:14 +01:00
Aleksey Kladov
a04177f135
Add local functions to bodies
2019-12-20 11:52:17 +01:00
Aleksey Kladov
5bd8de3f5e
Allow storing defs in bodies
2019-12-19 18:09:50 +01:00
Aleksey Kladov
04715cbe1c
Forbid <T>::foo syntax in mod paths
2019-12-18 17:41:33 +01:00
Aleksey Kladov
2619950b3b
Use different types for path with and without generics
2019-12-14 19:15:40 +01:00
Edwin Cheng
509fedd9d2
Remove MacroFileKind
2019-12-08 16:16:52 +08:00
Florian Diebold
18f6a995d0
Add expansion infrastructure for derive macros
2019-12-05 17:23:09 +01:00
ice1000
009437f5d9
Replace ra_hir_expand::either
with crate
2019-12-03 11:07:56 -05:00
Edwin Cheng
bb601e7eaf
Add BuiltinShadowMode
2019-11-30 23:29:21 +08:00
Aleksey Kladov
8f1f5a783a
Move source-related traits to a separate module
2019-11-28 19:05:21 +03:00
Aleksey Kladov
ccd1b0800a
Rename Source -> InFile
2019-11-28 12:50:26 +03:00
Aleksey Kladov
d9a36a736b
Rename module_id -> local_id
2019-11-27 21:31:51 +03:00
Edwin Cheng
447268ceac
Hide MacroCallLoc
2019-11-27 01:33:08 +08:00
Aleksey Kladov
d157812cd1
Docs
2019-11-24 20:39:48 +03:00
Aleksey Kladov
434f108ada
Simplify
2019-11-24 19:01:19 +03:00
Aleksey Kladov
99af523b68
Cleanup
2019-11-24 17:36:06 +03:00
Aleksey Kladov
e0b06cb672
Switch to StaticLoc for statics
2019-11-24 15:18:12 +03:00
Aleksey Kladov
fc1e543f7a
Get rid of DefDatabase2
2019-11-23 14:49:45 +03:00
Aleksey Kladov
111891dc2d
Move constants to new ID
...
This allows us to get rid of trait item index
2019-11-20 18:41:23 +03:00
Aleksey Kladov
cebeedc66f
Next gen IDs for functions
...
The current system with AstIds has two primaraly drawbacks:
* It is possible to manufacture IDs out of thin air.
For example, it's possible to create IDs for items which are not
considered in CrateDefMap due to cfg. Or it is possible to mixup
structs and unions, because they share ID space.
* Getting the ID of a parent requires a secondary index.
Instead, the plan is to pursue the more traditional approach, where
each items stores the id of the parent declaration. This makes
`FromSource` more awkward, but also more correct: now, to get from an
AST to HIR, we first do this recursively for the parent item, and the
just search the children of the parent for the matching def
2019-11-20 16:22:58 +03:00
Aleksey Kladov
36e3fc9d54
Rename Source::ast -> Source::value
2019-11-20 09:42:30 +03:00
Aleksey Kladov
1583ab1558
Move body queries to hir_def
2019-11-14 17:37:22 +03:00