File tree Expand file tree Collapse file tree 4 files changed +7
-4
lines changed Expand file tree Collapse file tree 4 files changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -73,10 +73,12 @@ impl ModDir {
7373 candidate_files. push ( self . dir_path . join_attr ( attr_path, self . root_non_dir_owner ) )
7474 }
7575 None if file_id. is_include_macro ( db. upcast ( ) ) => {
76+ let name = name. unescaped ( ) ;
7677 candidate_files. push ( format ! ( "{}.rs" , name) ) ;
7778 candidate_files. push ( format ! ( "{}/mod.rs" , name) ) ;
7879 }
7980 None => {
81+ let name = name. unescaped ( ) ;
8082 candidate_files. push ( format ! ( "{}{}.rs" , self . dir_path. 0 , name) ) ;
8183 candidate_files. push ( format ! ( "{}{}/mod.rs" , self . dir_path. 0 , name) ) ;
8284 }
Original file line number Diff line number Diff line change @@ -132,9 +132,9 @@ pub struct Bar;
132132 expect ! [ [ r#"
133133 crate
134134 Bar: t v
135- async: t
135+ r# async: t
136136
137- crate::async
137+ crate::r# async
138138 Bar: t v
139139 "# ] ] ,
140140 ) ;
Original file line number Diff line number Diff line change @@ -342,7 +342,8 @@ fn render_resolution_simple_(
342342 let ctx = ctx. import_to_add ( import_to_add) ;
343343 let kind = res_to_kind ( resolution) ;
344344
345- let mut item = CompletionItem :: new ( kind, ctx. source_range ( ) , local_name. to_smol_str ( ) ) ;
345+ let mut item =
346+ CompletionItem :: new ( kind, ctx. source_range ( ) , local_name. unescaped ( ) . to_smol_str ( ) ) ;
346347 item. set_relevance ( ctx. completion_relevance ( ) )
347348 . set_documentation ( scope_def_docs ( db, resolution) )
348349 . set_deprecated ( scope_def_is_deprecated ( & ctx, resolution) ) ;
Original file line number Diff line number Diff line change @@ -96,7 +96,7 @@ fn render(
9696 item. set_documentation ( ctx. docs ( func) )
9797 . set_deprecated ( ctx. is_deprecated ( func) || ctx. is_deprecated_assoc_item ( func) )
9898 . detail ( detail ( db, func) )
99- . lookup_by ( name. to_smol_str ( ) ) ;
99+ . lookup_by ( name. unescaped ( ) . to_smol_str ( ) ) ;
100100
101101 match ctx. completion . config . snippet_cap {
102102 Some ( cap) => {
You can’t perform that action at this time.
0 commit comments