Loïc BRANSTETT
765205b9b8
Improve allowness of the unexpected_cfgs lint
2022-03-01 14:29:12 +01:00
Nicholas Nethercote
056d48a2c9
Remove unnecessary sigils around Symbol::as_str()
calls.
2021-12-15 17:32:14 +11:00
Vadim Petrochenkov
a6808335d4
rustc_span: Ident::invalid
-> Ident::empty
...
The equivalent for `Symbol`s was renamed some time ago (`kw::Invalid` -> `kw::Empty`), and it makes sense to do the same thing for `Ident`s.
2021-10-17 23:20:30 +03:00
Vadim Petrochenkov
92804cd490
derive: Do not configure or clone items unless necessary
2021-09-24 21:45:51 +03:00
Vadim Petrochenkov
c993984e4d
builtin_macros: Make #[derive(A, B, ...)] cfg-eval its input only for A, B, ...
2021-09-24 21:45:51 +03:00
Esteban Küber
ba052bd8de
Various diagnostics clean ups/tweaks
...
* Always point at macros, including derive macros
* Point at non-local items that introduce a trait requirement
* On private associated item, point at definition
2021-07-19 08:43:35 -07:00
Vadim Petrochenkov
3f0729f378
expand: Move some more derive logic to rustc_builtin_macros
2021-06-20 18:48:42 +03:00
Vadim Petrochenkov
fbf1bec482
resolve/expand: Cache intermediate results of #[derive]
expansion
2021-04-04 17:51:41 +03:00
Vadim Petrochenkov
5d27728141
rustc_builtin_macros: Share some more logic between derive
and cfg_eval
2021-03-07 01:12:18 +03:00
Vadim Petrochenkov
f9019b7086
Move full configuration logic from rustc_expand
to rustc_builtin_macros
...
This logic is applicable to two specific macros and not to the expansion infrastructure in general.
2021-03-07 00:17:31 +03:00
Vadim Petrochenkov
069e612e73
rustc_ast: Replace AstLike::finalize_tokens
with a getter tokens_mut
2021-03-06 21:19:31 +03:00
Vadim Petrochenkov
dbdbd30bf2
expand/resolve: Turn #[derive]
into a regular macro attribute
2021-02-07 20:08:45 +03:00