@@ -41,14 +41,14 @@ fn add_vis_to_referenced_module_def(acc: &mut Assists, ctx: &AssistContext) -> O
4141 } ;
4242
4343 let current_module = ctx. sema . scope ( & path. syntax ( ) ) . module ( ) ?;
44- let target_module = def. module ( ctx. db ) ?;
44+ let target_module = def. module ( ctx. db ( ) ) ?;
4545
46- let vis = target_module. visibility_of ( ctx. db , & def) ?;
47- if vis. is_visible_from ( ctx. db , current_module. into ( ) ) {
46+ let vis = target_module. visibility_of ( ctx. db ( ) , & def) ?;
47+ if vis. is_visible_from ( ctx. db ( ) , current_module. into ( ) ) {
4848 return None ;
4949 } ;
5050
51- let ( offset, target, target_file, target_name) = target_data_for_def ( ctx. db , def) ?;
51+ let ( offset, target, target_file, target_name) = target_data_for_def ( ctx. db ( ) , def) ?;
5252
5353 let missing_visibility =
5454 if current_module. krate ( ) == target_module. krate ( ) { "pub(crate)" } else { "pub" } ;
@@ -72,16 +72,16 @@ fn add_vis_to_referenced_record_field(acc: &mut Assists, ctx: &AssistContext) ->
7272 let ( record_field_def, _) = ctx. sema . resolve_record_field ( & record_field) ?;
7373
7474 let current_module = ctx. sema . scope ( record_field. syntax ( ) ) . module ( ) ?;
75- let visibility = record_field_def. visibility ( ctx. db ) ;
76- if visibility. is_visible_from ( ctx. db , current_module. into ( ) ) {
75+ let visibility = record_field_def. visibility ( ctx. db ( ) ) ;
76+ if visibility. is_visible_from ( ctx. db ( ) , current_module. into ( ) ) {
7777 return None ;
7878 }
7979
80- let parent = record_field_def. parent_def ( ctx. db ) ;
81- let parent_name = parent. name ( ctx. db ) ;
82- let target_module = parent. module ( ctx. db ) ;
80+ let parent = record_field_def. parent_def ( ctx. db ( ) ) ;
81+ let parent_name = parent. name ( ctx. db ( ) ) ;
82+ let target_module = parent. module ( ctx. db ( ) ) ;
8383
84- let in_file_source = record_field_def. source ( ctx. db ) ;
84+ let in_file_source = record_field_def. source ( ctx. db ( ) ) ;
8585 let ( offset, target) = match in_file_source. value {
8686 hir:: FieldSource :: Named ( it) => {
8787 let s = it. syntax ( ) ;
@@ -95,9 +95,9 @@ fn add_vis_to_referenced_record_field(acc: &mut Assists, ctx: &AssistContext) ->
9595
9696 let missing_visibility =
9797 if current_module. krate ( ) == target_module. krate ( ) { "pub(crate)" } else { "pub" } ;
98- let target_file = in_file_source. file_id . original_file ( ctx. db ) ;
98+ let target_file = in_file_source. file_id . original_file ( ctx. db ( ) ) ;
9999
100- let target_name = record_field_def. name ( ctx. db ) ;
100+ let target_name = record_field_def. name ( ctx. db ( ) ) ;
101101 let assist_label =
102102 format ! ( "Change visibility of {}.{} to {}" , parent_name, target_name, missing_visibility) ;
103103
0 commit comments