Lukas Wirth
c04b0f435b
Move hir to new MacroId
2022-03-08 23:51:48 +01:00
hkalbasi
4fa8749c44
Preserve order of generic args
2022-03-04 11:46:14 +03:30
Lukas Wirth
2f8dd64830
Replace HasSource usages with Semantics equivalent
2022-01-14 10:59:27 +01:00
Lukas Wirth
36a5ce9790
minor: fix some clippy lints
2021-09-03 16:00:50 +02:00
Yoshua Wuyts
d6b788a9ee
Add trait codegen to add_missing_impl_members
assist
2021-08-10 10:27:52 +02:00
Aleksey Kladov
c2015e7d18
internal: more natural order of sources for TypeParam
...
We usually use first (left) variant of `Either` for "usual" case, and
use right for odd things. For example, pat source is Pat | SelfParam.
2021-06-14 22:42:43 +03:00
Jonas Schievink
93aeb16eb2
Return Either
from MacroDefId::ast_id
2021-03-19 19:56:13 +01:00
Jonas Schievink
c05a1a6e37
Store an AstId
for procedural macros
2021-03-18 16:11:18 +01:00
Jonas Schievink
b84efbaacf
Make MacroDefId's AstId
mandatory when possible
2021-03-18 15:37:14 +01:00
Jonas Schievink
ce29730bc7
Obtain ModuleId
's DefMap
through a method
2021-01-22 16:33:58 +01:00
Nick Spain
40cd6cdf67
Fix ConstParam HasSource impl and implement TryToNav not Nav
2021-01-02 22:11:25 +11:00
Nick Spain
887028fcf5
Remove old_source now we've fully migrated
...
Fixes #6913
2021-01-02 21:53:52 +11:00
Nick Spain
ea4708c444
Mark HasSource::source_old as deprecated but allow at all call sites
2021-01-02 21:53:51 +11:00
Nick Spain
2de2b1eca3
Implement new HasSource::source for all implementors of HasSource
2021-01-02 21:53:51 +11:00
Nick Spain
27cadcd531
HasSource::source -> HasSource::source_old
...
To start migrating HasSource::source to return an Option.
2021-01-02 21:53:51 +11:00
Lukas Wirth
0acdb73076
Add ConstParams to the HIR
2021-01-01 10:06:42 +01:00
Aleksey Kladov
f6ed16674c
Align code_model name with ungrammar
2020-12-20 10:05:24 +03:00
Aleksey Kladov
2ae31e34b1
Rename ImplDef -> Impl
...
We used to have `Def` suffix for all symbols, but we moved off from
that. `FunctionDef` isn't better than `Function`. Looks like we've
forgot to change `Impl` though!
2020-12-17 14:36:15 +03:00
bors[bot]
63bbdb31e5
Merge #6897
...
6897: Basic support for macros 2.0 r=jonas-schievink a=jonas-schievink
This adds support for (built-in-only) macros 2.0, and removes some hacks used for builtin derives, which are declared via macros 2.0 in libcore.
First steps for https://github.com/rust-analyzer/rust-analyzer/issues/2248 .
Blocked on https://github.com/rust-analyzer/ungrammar/pull/16 .
Co-authored-by: Jonas Schievink <jonasschievink@gmail.com>
Co-authored-by: Jonas Schievink <jonas.schievink@ferrous-systems.com>
2020-12-16 16:52:46 +00:00
Jonas Schievink
c31c3246a8
Basic support for decl macros 2.0
2020-12-15 18:43:34 +01:00
bors[bot]
eb9ba457b0
Merge #6879
...
6879: Change HasChildSource::ChildId assoc item to generic param r=matklad a=Veykril
Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
2020-12-15 17:22:03 +00:00
Lukas Wirth
2c67a4abe4
Change HasChildSource::ChildId assoc item to generic param
2020-12-15 18:21:01 +01:00
Jonas Schievink
c1cb595382
Move to upstream macro_rules!
model
2020-12-15 15:37:37 +01:00
Lukas Wirth
c6172f3f6d
Add LifetimeParam resolving to Semantics
2020-12-14 16:04:28 +01:00
Aleksey Kladov
ba8d6d1e4e
Remove more unreachable pubs
2020-11-02 16:58:33 +01:00
Dmitry
73315c9168
synchronizing changes
2020-08-15 02:37:43 +07:00
Aleksey Kladov
ae71a631fd
Rename ra_hir -> hir
2020-08-13 16:36:55 +02:00