fix clippy::clone_on_ref_ptr for compiler

This commit is contained in:
klensy 2024-10-07 22:22:51 +03:00
parent 0bff99403c
commit 746b675c5a
33 changed files with 98 additions and 91 deletions

View file

@ -14,6 +14,7 @@ use rustc_ast::{
};
use rustc_ast_pretty::pprust;
use rustc_data_structures::fx::FxHashSet;
use rustc_data_structures::sync::Lrc;
use rustc_errors::{
Applicability, Diag, DiagCtxtHandle, ErrorGuaranteed, FatalError, PErr, PResult, Subdiagnostic,
Suggestions, pluralize,
@ -2437,7 +2438,7 @@ impl<'a> Parser<'a> {
let mut labels = vec![];
while let TokenKind::Interpolated(nt) = &tok.kind {
let tokens = nt.tokens();
labels.push(nt.clone());
labels.push(Lrc::clone(nt));
if let Some(tokens) = tokens
&& let tokens = tokens.to_attr_token_stream()
&& let tokens = tokens.0.deref()