Nicholas Nethercote
5d3cc1713a
Rename some things related to literals.
...
- Rename `ast::Lit::token` as `ast::Lit::token_lit`, because its type is
`token::Lit`, which is not a token. (This has been confusing me for a
long time.)
reasonable because we have an `ast::token::Lit` inside an `ast::Lit`.
- Rename `LitKind::{from,to}_lit_token` as
`LitKind::{from,to}_token_lit`, to match the above change and
`token::Lit`.
2022-08-16 13:41:34 +10:00
Takayuki Maeda
77d6176e69
remove unnecessary to_string
and String::new
2022-06-13 15:48:40 +09:00
Jacob Pratt
49c82f31a8
Remove crate
visibility usage in compiler
2022-05-20 20:04:54 -04:00
Camille GILLOT
74583852e8
Save colon span to suggest bounds.
2022-04-30 13:55:17 +02:00
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