mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-15 23:05:41 +00:00
Auto merge of #16470 - Veykril:clippy-disallow, r=lnicola
internal: Lint debug prints and disallowed types with clippy
This commit is contained in:
commit
66cec4d11a
64 changed files with 170 additions and 229 deletions
|
@ -35,10 +35,11 @@
|
|||
//! as we don't have bincode in Cargo.toml yet, lets stick with serde_json for
|
||||
//! the time being.
|
||||
|
||||
use std::collections::{HashMap, VecDeque};
|
||||
use std::collections::VecDeque;
|
||||
|
||||
use indexmap::IndexSet;
|
||||
use la_arena::RawIdx;
|
||||
use rustc_hash::FxHashMap;
|
||||
use serde::{Deserialize, Serialize};
|
||||
use span::{ErasedFileAstId, FileId, Span, SpanAnchor, SyntaxContextId};
|
||||
use text_size::TextRange;
|
||||
|
@ -129,7 +130,7 @@ impl FlatTree {
|
|||
span_data_table: &mut SpanDataIndexMap,
|
||||
) -> FlatTree {
|
||||
let mut w = Writer {
|
||||
string_table: HashMap::new(),
|
||||
string_table: FxHashMap::default(),
|
||||
work: VecDeque::new(),
|
||||
span_data_table,
|
||||
|
||||
|
@ -158,7 +159,7 @@ impl FlatTree {
|
|||
|
||||
pub fn new_raw(subtree: &tt::Subtree<TokenId>, version: u32) -> FlatTree {
|
||||
let mut w = Writer {
|
||||
string_table: HashMap::new(),
|
||||
string_table: FxHashMap::default(),
|
||||
work: VecDeque::new(),
|
||||
span_data_table: &mut (),
|
||||
|
||||
|
@ -340,7 +341,7 @@ impl InternableSpan for Span {
|
|||
|
||||
struct Writer<'a, 'span, S: InternableSpan> {
|
||||
work: VecDeque<(usize, &'a tt::Subtree<S>)>,
|
||||
string_table: HashMap<&'a str, u32>,
|
||||
string_table: FxHashMap<&'a str, u32>,
|
||||
span_data_table: &'span mut S::Table,
|
||||
|
||||
subtree: Vec<SubtreeRepr>,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue