File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -381,6 +381,21 @@ fn main() {
381381 ) ;
382382 }
383383
384+ #[ test]
385+ fn empty_block_to_line ( ) {
386+ check_assist (
387+ convert_comment_block,
388+ r#"
389+ /**/$0
390+ fn main() {}
391+ "# ,
392+ r#"
393+
394+ fn main() {}
395+ "# ,
396+ ) ;
397+ }
398+
384399 #[ test]
385400 fn end_of_line_block_to_line ( ) {
386401 check_assist_not_applicable (
Original file line number Diff line number Diff line change @@ -32,11 +32,7 @@ impl ast::Comment {
3232 }
3333
3434 pub fn prefix ( & self ) -> & ' static str {
35- let & ( prefix, _kind) = CommentKind :: BY_PREFIX
36- . iter ( )
37- . find ( |& ( prefix, kind) | self . kind ( ) == * kind && self . text ( ) . starts_with ( prefix) )
38- . unwrap ( ) ;
39- prefix
35+ self . kind ( ) . prefix ( )
4036 }
4137
4238 /// Returns the textual content of a doc comment node as a single string with prefix and suffix
You can’t perform that action at this time.
0 commit comments