File tree Expand file tree Collapse file tree 2 files changed +7
-4
lines changed Expand file tree Collapse file tree 2 files changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -1167,7 +1167,7 @@ impl Renderer {
1167
1167
// otherwise the lines would end up needing to go over a message.
1168
1168
1169
1169
let mut annotations = line_info. annotations . clone ( ) ;
1170
- annotations. sort_by_key ( |a| Reverse ( a. start . display ) ) ;
1170
+ annotations. sort_by_key ( |a| Reverse ( ( a. start . display , a . start . char ) ) ) ;
1171
1171
1172
1172
// First, figure out where each label will be positioned.
1173
1173
//
@@ -1250,7 +1250,9 @@ impl Renderer {
1250
1250
// If we're overlapping with an un-labelled annotation with the same span
1251
1251
// we can just merge them in the output
1252
1252
if next. start . display == annotation. start . display
1253
+ && next. start . char == annotation. start . char
1253
1254
&& next. end . display == annotation. end . display
1255
+ && next. end . char == annotation. end . char
1254
1256
&& !next. has_label ( )
1255
1257
{
1256
1258
continue ;
@@ -1284,7 +1286,7 @@ impl Renderer {
1284
1286
&& next. takes_space ( ) )
1285
1287
|| ( annotation. takes_space ( ) && next. takes_space ( ) )
1286
1288
|| ( overlaps ( next, annotation, l)
1287
- && next. end . display <= annotation. end . display
1289
+ && ( next. end . display , next . end . char ) <= ( annotation. end . display , annotation . end . char )
1288
1290
&& next. has_label ( )
1289
1291
&& p == 0 )
1290
1292
// Avoid #42595.
Original file line number Diff line number Diff line change @@ -3500,8 +3500,9 @@ error: extern blocks should be unsafe
3500
3500
--> $DIR/unsafe-extern-suggestion.rs:6:1
3501
3501
|
3502
3502
LL | extern "C" {
3503
- | ^ help: needs `unsafe` before the extern keyword: `unsafe`
3504
- | _|
3503
+ | ^
3504
+ | |
3505
+ | _help: needs `unsafe` before the extern keyword: `unsafe`
3505
3506
| |
3506
3507
LL | | //~^ ERROR extern blocks should be unsafe [missing_unsafe_on_extern]
3507
3508
LL | | //~| WARN this is accepted in the current edition (Rust 2015) but is a hard error in Rust 2024!
You can’t perform that action at this time.
0 commit comments