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

@ -10,10 +10,10 @@ LL | fn oom(
LL | || info: &Layout,
LL | || ) -> ()
| ||_______- arguments to this function are incorrect
LL | | {
LL | | loop {}
LL | | }
| |_^ expected `&Layout`, found struct `Layout`
LL | | {
LL | | loop {}
LL | | }
| |__^ expected `&Layout`, found struct `Layout`
|
note: function defined here
--> $DIR/alloc-error-handler-bad-signature-1.rs:10:4
@ -36,10 +36,10 @@ LL | fn oom(
LL | || info: &Layout,
LL | || ) -> ()
| ||_______^ expected `!`, found `()`
LL | | {
LL | | loop {}
LL | | }
| |_- expected `!` because of return type
LL | | {
LL | | loop {}
LL | | }
| |__- 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
LL | | loop {}
LL | | }
| |_^ expected struct `Layout`, found struct `core::alloc::Layout`
| ||_- arguments to this function are incorrect
LL | | loop {}
LL | | }
| |__^ 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 `()`
LL | | loop {}
LL | | }
| |_- expected `!` because of return type
| ||_^ expected `!`, found `()`
LL | | loop {}
LL | | }
| |__- expected `!` because of return type
|
= note: expected type `!`
found unit type `()`

View File

@ -7,9 +7,9 @@ LL | for (i, _) in & & &
| ||
LL | || & &v
| ||___________- help: consider removing 5 leading `&`-references
LL | | .iter()
LL | | .enumerate() {
| |____________________^ `&&&&&Enumerate<std::slice::Iter<'_, {integer}>>` is not an iterator
LL | | .iter()
LL | | .enumerate() {
| |_____________________^ `&&&&&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`