summaryrefslogtreecommitdiffstats
path: root/src/tools/rust-analyzer/crates/hir-def/src/item_tree/pretty.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/tools/rust-analyzer/crates/hir-def/src/item_tree/pretty.rs')
-rw-r--r--src/tools/rust-analyzer/crates/hir-def/src/item_tree/pretty.rs8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/tools/rust-analyzer/crates/hir-def/src/item_tree/pretty.rs b/src/tools/rust-analyzer/crates/hir-def/src/item_tree/pretty.rs
index e873316a5..da30830fe 100644
--- a/src/tools/rust-analyzer/crates/hir-def/src/item_tree/pretty.rs
+++ b/src/tools/rust-analyzer/crates/hir-def/src/item_tree/pretty.rs
@@ -52,7 +52,7 @@ struct Printer<'a> {
needs_indent: bool,
}
-impl<'a> Printer<'a> {
+impl Printer<'_> {
fn indented(&mut self, f: impl FnOnce(&mut Self)) {
self.indent_level += 1;
wln!(self);
@@ -198,8 +198,8 @@ impl<'a> Printer<'a> {
self.print_attrs_of(item);
match item {
- ModItem::Import(it) => {
- let Import { visibility, use_tree, ast_id: _ } = &self.tree[it];
+ ModItem::Use(it) => {
+ let Use { visibility, use_tree, ast_id: _ } = &self.tree[it];
self.print_visibility(*visibility);
w!(self, "use ");
self.print_use_tree(use_tree);
@@ -572,7 +572,7 @@ impl<'a> Printer<'a> {
}
}
-impl<'a> Write for Printer<'a> {
+impl Write for Printer<'_> {
fn write_str(&mut self, s: &str) -> fmt::Result {
for line in s.split_inclusive('\n') {
if self.needs_indent {