Don't emit empty notes
This commit is contained in:
parent
063b1675b2
commit
2e2a4797a2
@ -1431,6 +1431,7 @@ impl EmitterWriter {
|
|||||||
};
|
};
|
||||||
for (i, annotation) in annotations.into_iter().enumerate() {
|
for (i, annotation) in annotations.into_iter().enumerate() {
|
||||||
if let Some(label) = &annotation.label {
|
if let Some(label) = &annotation.label {
|
||||||
|
if !label.is_empty() {
|
||||||
let style = if annotation.is_primary {
|
let style = if annotation.is_primary {
|
||||||
Style::LabelPrimary
|
Style::LabelPrimary
|
||||||
} else {
|
} else {
|
||||||
@ -1454,6 +1455,7 @@ impl EmitterWriter {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -6,8 +6,6 @@ LL | match x { }
|
|||||||
|
|
|
|
||||||
note: `Option<i32>` defined here
|
note: `Option<i32>` defined here
|
||||||
--> $SRC_DIR/core/src/option.rs:LL:COL
|
--> $SRC_DIR/core/src/option.rs:LL:COL
|
||||||
|
|
|
||||||
= note:
|
|
||||||
$SRC_DIR/core/src/option.rs:LL:COL: not covered
|
$SRC_DIR/core/src/option.rs:LL:COL: not covered
|
||||||
$SRC_DIR/core/src/option.rs:LL:COL: not covered
|
$SRC_DIR/core/src/option.rs:LL:COL: not covered
|
||||||
= note: the matched value is of type `Option<i32>`
|
= note: the matched value is of type `Option<i32>`
|
||||||
|
@ -8,8 +8,6 @@ LL | let Some(y) = x;
|
|||||||
= note: for more information, visit https://doc.rust-lang.org/book/ch18-02-refutability.html
|
= note: for more information, visit https://doc.rust-lang.org/book/ch18-02-refutability.html
|
||||||
note: `Option<i32>` defined here
|
note: `Option<i32>` defined here
|
||||||
--> $SRC_DIR/core/src/option.rs:LL:COL
|
--> $SRC_DIR/core/src/option.rs:LL:COL
|
||||||
|
|
|
||||||
= note:
|
|
||||||
$SRC_DIR/core/src/option.rs:LL:COL: not covered
|
$SRC_DIR/core/src/option.rs:LL:COL: not covered
|
||||||
= note: the matched value is of type `Option<i32>`
|
= note: the matched value is of type `Option<i32>`
|
||||||
help: you might want to use `if let` to ignore the variant that isn't matched
|
help: you might want to use `if let` to ignore the variant that isn't matched
|
||||||
|
@ -6,8 +6,6 @@ LL | for Some(x) in xs {}
|
|||||||
|
|
|
|
||||||
note: `Option<i32>` defined here
|
note: `Option<i32>` defined here
|
||||||
--> $SRC_DIR/core/src/option.rs:LL:COL
|
--> $SRC_DIR/core/src/option.rs:LL:COL
|
||||||
|
|
|
||||||
= note:
|
|
||||||
$SRC_DIR/core/src/option.rs:LL:COL: not covered
|
$SRC_DIR/core/src/option.rs:LL:COL: not covered
|
||||||
= note: the matched value is of type `Option<i32>`
|
= note: the matched value is of type `Option<i32>`
|
||||||
|
|
||||||
|
@ -8,8 +8,6 @@ LL | let Ok(_x) = foo();
|
|||||||
= note: for more information, visit https://doc.rust-lang.org/book/ch18-02-refutability.html
|
= note: for more information, visit https://doc.rust-lang.org/book/ch18-02-refutability.html
|
||||||
note: `Result<u32, !>` defined here
|
note: `Result<u32, !>` defined here
|
||||||
--> $SRC_DIR/core/src/result.rs:LL:COL
|
--> $SRC_DIR/core/src/result.rs:LL:COL
|
||||||
|
|
|
||||||
= note:
|
|
||||||
$SRC_DIR/core/src/result.rs:LL:COL: not covered
|
$SRC_DIR/core/src/result.rs:LL:COL: not covered
|
||||||
= note: the matched value is of type `Result<u32, !>`
|
= note: the matched value is of type `Result<u32, !>`
|
||||||
help: you might want to use `if let` to ignore the variant that isn't matched
|
help: you might want to use `if let` to ignore the variant that isn't matched
|
||||||
|
@ -6,8 +6,6 @@ LL | match Some(1) {
|
|||||||
|
|
|
|
||||||
note: `Option<i32>` defined here
|
note: `Option<i32>` defined here
|
||||||
--> $SRC_DIR/core/src/option.rs:LL:COL
|
--> $SRC_DIR/core/src/option.rs:LL:COL
|
||||||
|
|
|
||||||
= note:
|
|
||||||
$SRC_DIR/core/src/option.rs:LL:COL: not covered
|
$SRC_DIR/core/src/option.rs:LL:COL: not covered
|
||||||
= note: the matched value is of type `Option<i32>`
|
= note: the matched value is of type `Option<i32>`
|
||||||
help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern or an explicit pattern as shown
|
help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern or an explicit pattern as shown
|
||||||
|
@ -66,8 +66,6 @@ LL | match None {
|
|||||||
|
|
|
|
||||||
note: `Option<HiddenEnum>` defined here
|
note: `Option<HiddenEnum>` defined here
|
||||||
--> $SRC_DIR/core/src/option.rs:LL:COL
|
--> $SRC_DIR/core/src/option.rs:LL:COL
|
||||||
|
|
|
||||||
= note:
|
|
||||||
$SRC_DIR/core/src/option.rs:LL:COL: not covered
|
$SRC_DIR/core/src/option.rs:LL:COL: not covered
|
||||||
= note: the matched value is of type `Option<HiddenEnum>`
|
= note: the matched value is of type `Option<HiddenEnum>`
|
||||||
help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern, a match arm with multiple or-patterns as shown, or multiple match arms
|
help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern, a match arm with multiple or-patterns as shown, or multiple match arms
|
||||||
|
@ -107,8 +107,6 @@ LL | match Some(A) {
|
|||||||
|
|
|
|
||||||
note: `Option<Enum>` defined here
|
note: `Option<Enum>` defined here
|
||||||
--> $SRC_DIR/core/src/option.rs:LL:COL
|
--> $SRC_DIR/core/src/option.rs:LL:COL
|
||||||
|
|
|
||||||
= note:
|
|
||||||
= note: the matched value is of type `Option<Enum>`
|
= note: the matched value is of type `Option<Enum>`
|
||||||
help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern as shown, or multiple match arms
|
help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern as shown, or multiple match arms
|
||||||
|
|
|
|
||||||
|
@ -8,7 +8,7 @@ note: `Box<ElementKind>` defined here
|
|||||||
--> $SRC_DIR/alloc/src/boxed.rs:LL:COL
|
--> $SRC_DIR/alloc/src/boxed.rs:LL:COL
|
||||||
$SRC_DIR/alloc/src/boxed.rs:LL:COL
|
$SRC_DIR/alloc/src/boxed.rs:LL:COL
|
||||||
$SRC_DIR/alloc/src/boxed.rs:LL:COL
|
$SRC_DIR/alloc/src/boxed.rs:LL:COL
|
||||||
$SRC_DIR/alloc/src/boxed.rs:LL:COL:
|
$SRC_DIR/alloc/src/boxed.rs:LL:COL
|
||||||
= note: the matched value is of type `Box<ElementKind>`
|
= note: the matched value is of type `Box<ElementKind>`
|
||||||
help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern or an explicit pattern as shown
|
help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern or an explicit pattern as shown
|
||||||
|
|
|
|
||||||
|
@ -19,8 +19,6 @@ LL | match Some(Some(North)) {
|
|||||||
|
|
|
|
||||||
note: `Option<Option<Direction>>` defined here
|
note: `Option<Option<Direction>>` defined here
|
||||||
--> $SRC_DIR/core/src/option.rs:LL:COL
|
--> $SRC_DIR/core/src/option.rs:LL:COL
|
||||||
|
|
|
||||||
= note:
|
|
||||||
$SRC_DIR/core/src/option.rs:LL:COL: not covered
|
$SRC_DIR/core/src/option.rs:LL:COL: not covered
|
||||||
: not covered
|
: not covered
|
||||||
= note: the matched value is of type `Option<Option<Direction>>`
|
= note: the matched value is of type `Option<Option<Direction>>`
|
||||||
|
@ -6,8 +6,6 @@ LL | match private::DATA {
|
|||||||
|
|
|
|
||||||
note: `Option<Private>` defined here
|
note: `Option<Private>` defined here
|
||||||
--> $SRC_DIR/core/src/option.rs:LL:COL
|
--> $SRC_DIR/core/src/option.rs:LL:COL
|
||||||
|
|
|
||||||
= note:
|
|
||||||
$SRC_DIR/core/src/option.rs:LL:COL: not covered
|
$SRC_DIR/core/src/option.rs:LL:COL: not covered
|
||||||
= note: the matched value is of type `Option<Private>`
|
= note: the matched value is of type `Option<Private>`
|
||||||
help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern or an explicit pattern as shown
|
help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern or an explicit pattern as shown
|
||||||
|
@ -36,8 +36,6 @@ LL | match Some(10) {
|
|||||||
|
|
|
|
||||||
note: `Option<i32>` defined here
|
note: `Option<i32>` defined here
|
||||||
--> $SRC_DIR/core/src/option.rs:LL:COL
|
--> $SRC_DIR/core/src/option.rs:LL:COL
|
||||||
|
|
|
||||||
= note:
|
|
||||||
$SRC_DIR/core/src/option.rs:LL:COL: not covered
|
$SRC_DIR/core/src/option.rs:LL:COL: not covered
|
||||||
= note: the matched value is of type `Option<i32>`
|
= note: the matched value is of type `Option<i32>`
|
||||||
help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern or an explicit pattern as shown
|
help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern or an explicit pattern as shown
|
||||||
|
@ -8,8 +8,6 @@ LL | let Ok(x) = res;
|
|||||||
= note: for more information, visit https://doc.rust-lang.org/book/ch18-02-refutability.html
|
= note: for more information, visit https://doc.rust-lang.org/book/ch18-02-refutability.html
|
||||||
note: `Result<u32, &R<'_>>` defined here
|
note: `Result<u32, &R<'_>>` defined here
|
||||||
--> $SRC_DIR/core/src/result.rs:LL:COL
|
--> $SRC_DIR/core/src/result.rs:LL:COL
|
||||||
|
|
|
||||||
= note:
|
|
||||||
$SRC_DIR/core/src/result.rs:LL:COL: not covered
|
$SRC_DIR/core/src/result.rs:LL:COL: not covered
|
||||||
= note: the matched value is of type `Result<u32, &R<'_>>`
|
= note: the matched value is of type `Result<u32, &R<'_>>`
|
||||||
help: you might want to use `if let` to ignore the variant that isn't matched
|
help: you might want to use `if let` to ignore the variant that isn't matched
|
||||||
|
@ -6,8 +6,6 @@ LL | let _ = match x {
|
|||||||
|
|
|
|
||||||
note: `Result<u32, &Void>` defined here
|
note: `Result<u32, &Void>` defined here
|
||||||
--> $SRC_DIR/core/src/result.rs:LL:COL
|
--> $SRC_DIR/core/src/result.rs:LL:COL
|
||||||
|
|
|
||||||
= note:
|
|
||||||
$SRC_DIR/core/src/result.rs:LL:COL: not covered
|
$SRC_DIR/core/src/result.rs:LL:COL: not covered
|
||||||
= note: the matched value is of type `Result<u32, &Void>`
|
= note: the matched value is of type `Result<u32, &Void>`
|
||||||
help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern or an explicit pattern as shown
|
help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern or an explicit pattern as shown
|
||||||
@ -85,8 +83,6 @@ LL | let _ = match x {
|
|||||||
|
|
|
|
||||||
note: `Result<u32, Void>` defined here
|
note: `Result<u32, Void>` defined here
|
||||||
--> $SRC_DIR/core/src/result.rs:LL:COL
|
--> $SRC_DIR/core/src/result.rs:LL:COL
|
||||||
|
|
|
||||||
= note:
|
|
||||||
$SRC_DIR/core/src/result.rs:LL:COL: not covered
|
$SRC_DIR/core/src/result.rs:LL:COL: not covered
|
||||||
= note: the matched value is of type `Result<u32, Void>`
|
= note: the matched value is of type `Result<u32, Void>`
|
||||||
help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern or an explicit pattern as shown
|
help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern or an explicit pattern as shown
|
||||||
@ -105,8 +101,6 @@ LL | let Ok(x) = x;
|
|||||||
= note: for more information, visit https://doc.rust-lang.org/book/ch18-02-refutability.html
|
= note: for more information, visit https://doc.rust-lang.org/book/ch18-02-refutability.html
|
||||||
note: `Result<u32, Void>` defined here
|
note: `Result<u32, Void>` defined here
|
||||||
--> $SRC_DIR/core/src/result.rs:LL:COL
|
--> $SRC_DIR/core/src/result.rs:LL:COL
|
||||||
|
|
|
||||||
= note:
|
|
||||||
$SRC_DIR/core/src/result.rs:LL:COL: not covered
|
$SRC_DIR/core/src/result.rs:LL:COL: not covered
|
||||||
= note: the matched value is of type `Result<u32, Void>`
|
= note: the matched value is of type `Result<u32, Void>`
|
||||||
help: you might want to use `if let` to ignore the variant that isn't matched
|
help: you might want to use `if let` to ignore the variant that isn't matched
|
||||||
|
Loading…
x
Reference in New Issue
Block a user