rust/compiler/rustc_expand/src
Nicholas Nethercote 2fef0a30ae Replace infallible name_or_empty methods with fallible name methods.
I'm removing empty identifiers everywhere, because in practice they
always mean "no identifier" rather than "empty identifier". (An empty
identifier is impossible.) It's better to use `Option` to mean "no
identifier" because you then can't forget about the "no identifier"
possibility.

Some specifics:
- When testing an attribute for a single name, the commit uses the
  `has_name` method.
- When testing an attribute for multiple names, the commit uses the new
  `has_any_name` method.
- When using `match` on an attribute, the match arms now have `Some` on
  them.

In the tests, we now avoid printing empty identifiers by not printing
the identifier in the `error:` line at all, instead letting the carets
point out the problem.
2025-04-17 09:50:52 +10:00
..
mbe Auto merge of #124141 - nnethercote:rm-Nonterminal-and-TokenKind-Interpolated, r=petrochenkov 2025-04-14 03:56:55 +00:00
base.rs Replace infallible name_or_empty methods with fallible name methods. 2025-04-17 09:50:52 +10:00
build.rs Implement super let. 2025-04-04 09:44:19 +02:00
config.rs Remove TokenStream::flattened and InvisibleOrigin::FlattenToken. 2025-04-02 16:16:51 +11:00
errors.rs Re-export more rustc_span::symbol things from rustc_span. 2024-12-18 13:38:53 +11:00
expand.rs Replace infallible name_or_empty methods with fallible name methods. 2025-04-17 09:50:52 +10:00
lib.rs Remove #![warn(unreachable_pub)] from all compiler/ crates. 2025-03-11 13:14:21 +11:00
mbe.rs Re-export more rustc_span::symbol things from rustc_span. 2024-12-18 13:38:53 +11:00
module.rs Reject macro calls inside of #![crate_name] 2025-02-15 16:47:30 +01:00
placeholders.rs Move ast::Item::ident into ast::ItemKind. 2025-04-01 14:08:57 +11:00
proc_macro.rs Remove NtItem and NtStmt. 2025-03-07 14:51:07 +11:00
proc_macro_server.rs Rollup merge of #139671 - m-ou-se:proc-macro-span, r=dtolnay 2025-04-15 15:47:27 +10:00