File tree Expand file tree Collapse file tree 1 file changed +23
-0
lines changed Expand file tree Collapse file tree 1 file changed +23
-0
lines changed Original file line number Diff line number Diff line change @@ -2612,3 +2612,26 @@ error[E0277]: the size for values of type `T` cannot be known at compilation tim
2612
2612
let renderer = Renderer :: plain ( ) ;
2613
2613
assert_data_eq ! ( renderer. render( input_new) , expected) ;
2614
2614
}
2615
+
2616
+ #[ test]
2617
+ fn empty_span_start_line ( ) {
2618
+ let source = "#: E112\n if False:\n print()\n #: E113\n print()\n " ;
2619
+ let input = & [ Group :: with_level ( Level :: ERROR ) . element (
2620
+ Snippet :: source ( source)
2621
+ . line_start ( 7 )
2622
+ . fold ( false )
2623
+ . annotation ( AnnotationKind :: Primary . span ( 18 ..18 ) . label ( "E112" ) ) ,
2624
+ ) ] ;
2625
+
2626
+ let expected = str![ [ r#"
2627
+ |
2628
+ 7 | #: E112
2629
+ 8 | if False:
2630
+ 9 | print()
2631
+ | ^ E112
2632
+ 10 | #: E113
2633
+ 11 | print()
2634
+ "# ] ] ;
2635
+ let renderer = Renderer :: plain ( ) ;
2636
+ assert_data_eq ! ( renderer. render( input) , expected) ;
2637
+ }
You can’t perform that action at this time.
0 commit comments