mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-11-02 04:48:13 +00:00
Remove unnecessary predefined symbol clones
Now that they're const it's no longer needed. Nothing manual was performed: only a regexp search of `sym::([\w][\w\d]*)\.clone\(\)` and replace by `sym::$1`.
This commit is contained in:
parent
9477e46bec
commit
0f325c7ff8
55 changed files with 312 additions and 361 deletions
|
|
@ -80,7 +80,7 @@ impl<'t> Bindings<'t> {
|
|||
| MetaVarKind::Expr(_)
|
||||
| MetaVarKind::Ident => {
|
||||
builder.push(tt::Leaf::Ident(tt::Ident {
|
||||
sym: sym::missing.clone(),
|
||||
sym: sym::missing,
|
||||
span,
|
||||
is_raw: tt::IdentIsRaw::No,
|
||||
}));
|
||||
|
|
@ -93,7 +93,7 @@ impl<'t> Bindings<'t> {
|
|||
spacing: tt::Spacing::Joint,
|
||||
}),
|
||||
tt::Leaf::Ident(tt::Ident {
|
||||
sym: sym::missing.clone(),
|
||||
sym: sym::missing,
|
||||
span,
|
||||
is_raw: tt::IdentIsRaw::No,
|
||||
}),
|
||||
|
|
@ -101,7 +101,7 @@ impl<'t> Bindings<'t> {
|
|||
}
|
||||
MetaVarKind::Literal => {
|
||||
builder.push(tt::Leaf::Ident(tt::Ident {
|
||||
sym: sym::missing.clone(),
|
||||
sym: sym::missing,
|
||||
span,
|
||||
is_raw: tt::IdentIsRaw::No,
|
||||
}));
|
||||
|
|
|
|||
|
|
@ -228,7 +228,7 @@ fn next_op(
|
|||
tt::Leaf::Ident(ident) if ident.sym == sym::crate_ => {
|
||||
// We simply produce identifier `$crate` here. And it will be resolved when lowering ast to Path.
|
||||
Op::Ident(tt::Ident {
|
||||
sym: sym::dollar_crate.clone(),
|
||||
sym: sym::dollar_crate,
|
||||
span: ident.span,
|
||||
is_raw: tt::IdentIsRaw::No,
|
||||
})
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue