about summary refs log tree commit diff
path: root/compiler/rustc_lint/src/builtin.rs
diff options
context:
space:
mode:
authorNicholas Nethercote <n.nethercote@gmail.com>2025-03-20 17:28:45 +1100
committerNicholas Nethercote <n.nethercote@gmail.com>2025-04-01 13:42:00 +1100
commitdeed0f2480c507f7a3979ea814ade54685c5c45a (patch)
treebeedd2b83c9b7ad5ac0359b18e2a2a4cbf2692ce /compiler/rustc_lint/src/builtin.rs
parent4c551bcacd4b6d5652a6e9bc6fd5b7afbac435ae (diff)
downloadrust-deed0f2480c507f7a3979ea814ade54685c5c45a.tar.gz
rust-deed0f2480c507f7a3979ea814ade54685c5c45a.zip
Remove useless `Option<Ident>` arg.
`FmtVisitor::visit_mac` has an `Option<Ident>` arg which is always
either `None` or `Some(kw::Empty)`, because `ItemKind::MacCall` always
has an empty ident. This value is passed through various functions until
it reaches `rewrite_macro_name`, which treats `None` and
`Some(kw::Empty)` the same.

In other words, the argument is useless. This commit removes it. There
is no change in behaviour. The commit also changes a few `symbol::Ident`
occurrences to `Ident` in `macros.rs`; `Symbol` is imported in that file
so `Ident` might as well be, too.

(This is a good example of why it's a bad idea for `Itemt` to have an
`ident` field when various item kinds don't have an identifier. It's
easy to get confused when "empty identifier" is used to mean "no
identifier". This will be fixed in a subsequent commit.)
Diffstat (limited to 'compiler/rustc_lint/src/builtin.rs')
0 files changed, 0 insertions, 0 deletions