Tweak output

This commit is contained in:
Esteban Küber 2022-11-23 14:51:24 -08:00
parent ab04080b56
commit 6f64432a39
4 changed files with 20 additions and 24 deletions

View file

@ -2282,7 +2282,7 @@ impl FileWithAnnotatedLines {
}
// Find overlapping multiline annotations, put them at different depths
multiline_annotations.sort_by_key(|&(_, ref ml)| (ml.line_start, ml.line_end));
multiline_annotations.sort_by_key(|&(_, ref ml)| (ml.line_start, usize::MAX - ml.line_end));
for (_, ann) in multiline_annotations.clone() {
for (_, a) in multiline_annotations.iter_mut() {
// Move all other multiline annotations overlapping with this one

View file

@ -13,7 +13,7 @@ LL | || ) -> ()
LL | | {
LL | | loop {}
LL | | }
| |_^ expected `&Layout`, found struct `Layout`
| |__^ expected `&Layout`, found struct `Layout`
|
note: function defined here
--> $DIR/alloc-error-handler-bad-signature-1.rs:10:4
@ -39,7 +39,7 @@ LL | || ) -> ()
LL | | {
LL | | loop {}
LL | | }
| |_- expected `!` because of return type
| |__- expected `!` because of return type
|
= note: expected type `!`
found unit type `()`

View file

@ -9,12 +9,10 @@ LL | fn oom(
| ||
LL | || info: Layout,
LL | || ) {
| || -
| ||_|
| | arguments to this function are incorrect
| ||_- arguments to this function are incorrect
LL | | loop {}
LL | | }
| |_^ expected struct `Layout`, found struct `core::alloc::Layout`
| |__^ expected struct `Layout`, found struct `core::alloc::Layout`
|
= note: struct `core::alloc::Layout` and struct `Layout` have similar names, but are actually distinct types
note: struct `core::alloc::Layout` is defined in crate `core`
@ -47,12 +45,10 @@ LL | fn oom(
| ||
LL | || info: Layout,
LL | || ) {
| || ^
| ||_|
| | expected `!`, found `()`
| ||_^ expected `!`, found `()`
LL | | loop {}
LL | | }
| |_- expected `!` because of return type
| |__- expected `!` because of return type
|
= note: expected type `!`
found unit type `()`

View file

@ -9,7 +9,7 @@ LL | || & &v
| ||___________- help: consider removing 5 leading `&`-references
LL | | .iter()
LL | | .enumerate() {
| |____________________^ `&&&&&Enumerate<std::slice::Iter<'_, {integer}>>` is not an iterator
| |_____________________^ `&&&&&Enumerate<std::slice::Iter<'_, {integer}>>` is not an iterator
|
= help: the trait `Iterator` is not implemented for `&&&&&Enumerate<std::slice::Iter<'_, {integer}>>`
= note: required for `&&&&&Enumerate<std::slice::Iter<'_, {integer}>>` to implement `IntoIterator`