Auto merge of #16470 - Veykril:clippy-disallow, r=lnicola

internal: Lint debug prints and disallowed types with clippy
This commit is contained in:
bors 2024-02-05 17:20:43 +00:00
commit 66cec4d11a
64 changed files with 170 additions and 229 deletions

View file

@ -46,6 +46,7 @@ impl CheckReparse {
Some(CheckReparse { text, edit, edited_text })
}
#[allow(clippy::print_stderr)]
pub fn run(&self) {
let parse = SourceFile::parse(&self.text);
let new_parse = parse.reparse(&self.edit);

View file

@ -3,14 +3,12 @@
//! Specifically, it generates the `SyntaxKind` enum and a number of newtype
//! wrappers around `SyntaxNode` which implement `syntax::AstNode`.
use std::{
collections::{BTreeSet, HashSet},
fmt::Write,
};
use std::{collections::BTreeSet, fmt::Write};
use itertools::Itertools;
use proc_macro2::{Punct, Spacing};
use quote::{format_ident, quote};
use rustc_hash::FxHashSet;
use ungrammar::{Grammar, Rule};
use crate::tests::ast_src::{
@ -278,7 +276,7 @@ fn generate_nodes(kinds: KindsSrc<'_>, grammar: &AstSrc) -> String {
}
});
let defined_nodes: HashSet<_> = node_names.collect();
let defined_nodes: FxHashSet<_> = node_names.collect();
for node in kinds
.nodes