aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--crates/hir_def/src/item_tree/lower.rs2
-rw-r--r--crates/ide_assists/src/handlers/extract_type_alias.rs2
-rw-r--r--crates/ide_completion/src/context.rs2
-rw-r--r--crates/proc_macro_api/src/msg.rs2
-rw-r--r--crates/rust-analyzer/src/handlers.rs2
5 files changed, 5 insertions, 5 deletions
diff --git a/crates/hir_def/src/item_tree/lower.rs b/crates/hir_def/src/item_tree/lower.rs
index 0e467d907..cfda7cb32 100644
--- a/crates/hir_def/src/item_tree/lower.rs
+++ b/crates/hir_def/src/item_tree/lower.rs
@@ -130,7 +130,7 @@ impl<'a> Ctx<'a> {
130 ast::Item::ExternBlock(ast) => self.lower_extern_block(ast).into(), 130 ast::Item::ExternBlock(ast) => self.lower_extern_block(ast).into(),
131 }; 131 };
132 132
133 self.add_attrs(item.into(), attrs.clone()); 133 self.add_attrs(item.into(), attrs);
134 134
135 Some(item) 135 Some(item)
136 } 136 }
diff --git a/crates/ide_assists/src/handlers/extract_type_alias.rs b/crates/ide_assists/src/handlers/extract_type_alias.rs
index 4bccf5984..eac8857c6 100644
--- a/crates/ide_assists/src/handlers/extract_type_alias.rs
+++ b/crates/ide_assists/src/handlers/extract_type_alias.rs
@@ -31,7 +31,7 @@ pub(crate) fn extract_type_alias(acc: &mut Assists, ctx: &AssistContext) -> Opti
31 let item = ctx.find_node_at_offset::<ast::Item>()?; 31 let item = ctx.find_node_at_offset::<ast::Item>()?;
32 let insert = match_ast! { 32 let insert = match_ast! {
33 match (item.syntax().parent()?) { 33 match (item.syntax().parent()?) {
34 ast::AssocItemList(it) => it.syntax().parent()?.clone(), 34 ast::AssocItemList(it) => it.syntax().parent()?,
35 _ => item.syntax().clone(), 35 _ => item.syntax().clone(),
36 } 36 }
37 }; 37 };
diff --git a/crates/ide_completion/src/context.rs b/crates/ide_completion/src/context.rs
index 6f685c02f..cb4f08e53 100644
--- a/crates/ide_completion/src/context.rs
+++ b/crates/ide_completion/src/context.rs
@@ -567,7 +567,7 @@ impl<'a> CompletionContext<'a> {
567 None => return, 567 None => return,
568 }; 568 };
569 569
570 if let Some(segment) = ast::PathSegment::cast(parent.clone()) { 570 if let Some(segment) = ast::PathSegment::cast(parent) {
571 let path = segment.parent_path(); 571 let path = segment.parent_path();
572 self.is_call = path 572 self.is_call = path
573 .syntax() 573 .syntax()
diff --git a/crates/proc_macro_api/src/msg.rs b/crates/proc_macro_api/src/msg.rs
index f525df152..14eed4289 100644
--- a/crates/proc_macro_api/src/msg.rs
+++ b/crates/proc_macro_api/src/msg.rs
@@ -92,7 +92,7 @@ fn read_json<'a>(
92 92
93 // Some ill behaved macro try to use stdout for debugging 93 // Some ill behaved macro try to use stdout for debugging
94 // We ignore it here 94 // We ignore it here
95 if !buf.starts_with("{") { 95 if !buf.starts_with('{') {
96 log::error!("proc-macro tried to print : {}", buf); 96 log::error!("proc-macro tried to print : {}", buf);
97 continue; 97 continue;
98 } 98 }
diff --git a/crates/rust-analyzer/src/handlers.rs b/crates/rust-analyzer/src/handlers.rs
index 456744603..49ee4b922 100644
--- a/crates/rust-analyzer/src/handlers.rs
+++ b/crates/rust-analyzer/src/handlers.rs
@@ -1640,7 +1640,7 @@ fn run_rustfmt(
1640 .into()); 1640 .into());
1641 } 1641 }
1642 1642
1643 let frange = from_proto::file_range(&snap, text_document.clone(), range)?; 1643 let frange = from_proto::file_range(&snap, text_document, range)?;
1644 let start_line = line_index.index.line_col(frange.range.start()).line; 1644 let start_line = line_index.index.line_col(frange.range.start()).line;
1645 let end_line = line_index.index.line_col(frange.range.end()).line; 1645 let end_line = line_index.index.line_col(frange.range.end()).line;
1646 1646