From 87171238c6c528c421f06de8cd7e41ed3b6ff57a Mon Sep 17 00:00:00 2001 From: oxalica Date: Tue, 16 Mar 2021 00:05:03 +0800 Subject: Use hir formatter more --- crates/hir_def/src/item_tree/lower.rs | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'crates/hir_def/src/item_tree') diff --git a/crates/hir_def/src/item_tree/lower.rs b/crates/hir_def/src/item_tree/lower.rs index 6b5438dc9..7e91b991d 100644 --- a/crates/hir_def/src/item_tree/lower.rs +++ b/crates/hir_def/src/item_tree/lower.rs @@ -500,7 +500,9 @@ impl Ctx { let visibility = self.lower_visibility(trait_def); let generic_params = self.lower_generic_params_and_inner_items(GenericsOwner::Trait(trait_def), trait_def); - let auto = trait_def.auto_token().is_some(); + let is_auto = trait_def.auto_token().is_some(); + let is_unsafe = trait_def.unsafe_token().is_some(); + let bounds = self.lower_type_bounds(trait_def); let items = trait_def.assoc_item_list().map(|list| { self.with_inherited_visibility(visibility, |this| { list.assoc_items() @@ -520,7 +522,9 @@ impl Ctx { name, visibility, generic_params, - auto, + is_auto, + is_unsafe, + bounds: bounds.into(), items: items.unwrap_or_default(), ast_id, }; -- cgit v1.2.3