mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-30 22:01:37 +00:00
clippy::redudant_borrow
This commit is contained in:
parent
d6737e55fb
commit
c9b4ac5be4
114 changed files with 285 additions and 285 deletions
|
@ -28,7 +28,7 @@ pub(crate) fn generate_lint_completions() -> Result<()> {
|
|||
contents.push('\n');
|
||||
|
||||
cmd!("curl https://rust-lang.github.io/rust-clippy/master/lints.json --output ./target/clippy_lints.json").run()?;
|
||||
generate_descriptor_clippy(&mut contents, &Path::new("./target/clippy_lints.json"))?;
|
||||
generate_descriptor_clippy(&mut contents, Path::new("./target/clippy_lints.json"))?;
|
||||
let contents = reformat(&contents)?;
|
||||
|
||||
let destination = project_root().join("crates/ide_db/src/helpers/generated_lints.rs");
|
||||
|
|
|
@ -258,7 +258,7 @@ fn generate_nodes(kinds: KindsSrc<'_>, grammar: &AstSrc) -> Result<String> {
|
|||
for chunk in ast.split("# [pretty_doc_comment_placeholder_workaround] ") {
|
||||
res.push_str(chunk);
|
||||
if let Some(doc) = docs.next() {
|
||||
write_doc_comment(&doc, &mut res);
|
||||
write_doc_comment(doc, &mut res);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -294,14 +294,14 @@ fn generate_syntax_kinds(grammar: KindsSrc<'_>) -> Result<String> {
|
|||
|
||||
let full_keywords_values = &grammar.keywords;
|
||||
let full_keywords =
|
||||
full_keywords_values.iter().map(|kw| format_ident!("{}_KW", to_upper_snake_case(&kw)));
|
||||
full_keywords_values.iter().map(|kw| format_ident!("{}_KW", to_upper_snake_case(kw)));
|
||||
|
||||
let all_keywords_values =
|
||||
grammar.keywords.iter().chain(grammar.contextual_keywords.iter()).collect::<Vec<_>>();
|
||||
let all_keywords_idents = all_keywords_values.iter().map(|kw| format_ident!("{}", kw));
|
||||
let all_keywords = all_keywords_values
|
||||
.iter()
|
||||
.map(|name| format_ident!("{}_KW", to_upper_snake_case(&name)))
|
||||
.map(|name| format_ident!("{}_KW", to_upper_snake_case(name)))
|
||||
.collect::<Vec<_>>();
|
||||
|
||||
let literals =
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue