Commit 89c9aba 1 parent e97c3e2 commit 89c9aba Copy full SHA for 89c9aba
File tree 2 files changed +15
-1
lines changed
2 files changed +15
-1
lines changed Original file line number Diff line number Diff line change @@ -530,6 +530,7 @@ impl Default for Config {
530
530
531
531
#[ test]
532
532
#[ should_panic]
533
+ #[ allow( clippy:: reversed_empty_ranges) ]
533
534
fn backwards_label_should_panic ( ) {
534
535
Label :: new ( 1 ..0 ) ;
535
536
}
Original file line number Diff line number Diff line change @@ -723,7 +723,20 @@ impl<S: Span> Report<'_, S> {
723
723
let underline = get_underline ( col) . filter ( |_| row == 0 ) ;
724
724
let [ c, tail] = if let Some ( vbar_ll) = vbar {
725
725
let [ c, tail] = if underline. is_some ( ) {
726
- [ draw. underbar , draw. underline ]
726
+ // TODO: Is this good?
727
+ // The `true` is used here because it's temporarily disabling a
728
+ // feature that might be reenabled later.
729
+ #[ allow( clippy:: overly_complex_bool_expr) ]
730
+ if ExactSizeIterator :: len ( & vbar_ll. label . char_span ) <= 1 || true
731
+ {
732
+ [ draw. underbar , draw. underline ]
733
+ } else if line. offset ( ) + col == vbar_ll. label . char_span . start {
734
+ [ draw. ltop , draw. underbar ]
735
+ } else if line. offset ( ) + col == vbar_ll. label . last_offset ( ) {
736
+ [ draw. rtop , draw. underbar ]
737
+ } else {
738
+ [ draw. underbar , draw. underline ]
739
+ }
727
740
} else if vbar_ll. multi && row == 0 && self . config . multiline_arrows
728
741
{
729
742
[ draw. uarrow , ' ' ]
You can’t perform that action at this time.
0 commit comments