if !sm.ensure_source_file_source_present(annotated_file.file.clone()) {
if !self.short_message {
// We'll just print an unannotated message.
- for (annotation_id, line) in annotated_file.lines.into_iter().enumerate() {
+ for (annotation_id, line) in annotated_file.lines.iter().enumerate() {
let mut annotations = line.annotations.clone();
annotations.sort_by_key(|a| Reverse(a.start_col));
let mut line_idx = buffer.num_lines();
- buffer.append(
- line_idx,
- &format!(
- "{}:{}:{}",
- sm.filename_for_diagnostics(&annotated_file.file.name),
- sm.doctest_offset_line(&annotated_file.file.name, line.line_index),
- annotations[0].start_col + 1,
- ),
- Style::LineAndColumn,
- );
- if annotation_id == 0 {
- buffer.prepend(line_idx, "--> ", Style::LineNumber);
+
+ let labels: Vec<_> = annotations
+ .iter()
+ .filter_map(|a| Some((a.label.as_ref()?, a.is_primary)))
+ .filter(|(l, _)| !l.is_empty())
+ .collect();
+
+ if annotation_id == 0 || !labels.is_empty() {
+ buffer.append(
+ line_idx,
+ &format!(
+ "{}:{}:{}",
+ sm.filename_for_diagnostics(&annotated_file.file.name),
+ sm.doctest_offset_line(
+ &annotated_file.file.name,
+ line.line_index
+ ),
+ annotations[0].start_col + 1,
+ ),
+ Style::LineAndColumn,
+ );
+ if annotation_id == 0 {
+ buffer.prepend(line_idx, "--> ", Style::LineNumber);
+ } else {
+ buffer.prepend(line_idx, "::: ", Style::LineNumber);
+ }
for _ in 0..max_line_num_len {
buffer.prepend(line_idx, " ", Style::NoStyle);
}
line_idx += 1;
- };
- for (i, annotation) in annotations.into_iter().enumerate() {
- if let Some(label) = &annotation.label {
- if !label.is_empty() {
- let style = if annotation.is_primary {
- Style::LabelPrimary
- } else {
- Style::LabelSecondary
- };
- if annotation_id == 0 {
- buffer.prepend(line_idx, " |", Style::LineNumber);
- for _ in 0..max_line_num_len {
- buffer.prepend(line_idx, " ", Style::NoStyle);
- }
- line_idx += 1;
- buffer.append(line_idx + i, " = note: ", style);
- for _ in 0..max_line_num_len {
- buffer.prepend(line_idx, " ", Style::NoStyle);
- }
- } else {
- buffer.append(line_idx + i, ": ", style);
- }
- buffer.append(line_idx + i, label, style);
- }
+ }
+ for (label, is_primary) in labels.into_iter() {
+ let style = if is_primary {
+ Style::LabelPrimary
+ } else {
+ Style::LabelSecondary
+ };
+ buffer.prepend(line_idx, " |", Style::LineNumber);
+ for _ in 0..max_line_num_len {
+ buffer.prepend(line_idx, " ", Style::NoStyle);
+ }
+ line_idx += 1;
+ buffer.append(line_idx, " = note: ", style);
+ for _ in 0..max_line_num_len {
+ buffer.prepend(line_idx, " ", Style::NoStyle);
}
+ buffer.append(line_idx, label, style);
+ line_idx += 1;
}
}
}
= note: wrap the `{integer}` in a closure with no arguments: `|| { /* code */ }`
note: required by a bound in `Option::<T>::or_else`
--> $SRC_DIR/core/src/option.rs:LL:COL
-$SRC_DIR/core/src/option.rs:LL:COL
-$SRC_DIR/core/src/option.rs:LL:COL
-$SRC_DIR/core/src/option.rs:LL:COL
error: aborting due to previous error
| ^^
note: required by a bound in `spawn`
--> $SRC_DIR/std/src/thread/mod.rs:LL:COL
-$SRC_DIR/std/src/thread/mod.rs:LL:COL
-$SRC_DIR/std/src/thread/mod.rs:LL:COL
-$SRC_DIR/std/src/thread/mod.rs:LL:COL
-$SRC_DIR/std/src/thread/mod.rs:LL:COL
error[E0277]: `Sender<()>` cannot be shared between threads safely
--> $DIR/closure-move-sync.rs:18:19
| ^^
note: required by a bound in `spawn`
--> $SRC_DIR/std/src/thread/mod.rs:LL:COL
-$SRC_DIR/std/src/thread/mod.rs:LL:COL
-$SRC_DIR/std/src/thread/mod.rs:LL:COL
-$SRC_DIR/std/src/thread/mod.rs:LL:COL
-$SRC_DIR/std/src/thread/mod.rs:LL:COL
error: aborting due to 2 previous errors
= note: unsafe function cannot be called generically without an unsafe block
note: required by a bound in `Option::<T>::map`
--> $SRC_DIR/core/src/option.rs:LL:COL
-$SRC_DIR/core/src/option.rs:LL:COL
-$SRC_DIR/core/src/option.rs:LL:COL
-$SRC_DIR/core/src/option.rs:LL:COL
error: aborting due to previous error
|
note: `Option<i32>` defined here
--> $SRC_DIR/core/src/option.rs:LL:COL
-$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
+ |
+ = note: not covered
+ ::: $SRC_DIR/core/src/option.rs:LL:COL
+ |
+ = note: not covered
= 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, a match arm with multiple or-patterns as shown, or multiple match arms
|
= note: for more information, visit https://doc.rust-lang.org/book/ch18-02-refutability.html
note: `Option<i32>` defined here
--> $SRC_DIR/core/src/option.rs:LL:COL
-$SRC_DIR/core/src/option.rs:LL:COL: not covered
+ ::: $SRC_DIR/core/src/option.rs:LL:COL
+ |
+ = note: not covered
= 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
|
|
note: `Option<i32>` defined here
--> $SRC_DIR/core/src/option.rs:LL:COL
-$SRC_DIR/core/src/option.rs:LL:COL: not covered
+ ::: $SRC_DIR/core/src/option.rs:LL:COL
+ |
+ = note: not covered
= note: the matched value is of type `Option<i32>`
error: aborting due to previous error
= help: the trait `FnOnce<({integer},)>` is not implemented for `Option<_>`
note: required by a bound in `Option::<T>::and_then`
--> $SRC_DIR/core/src/option.rs:LL:COL
-$SRC_DIR/core/src/option.rs:LL:COL
-$SRC_DIR/core/src/option.rs:LL:COL
-$SRC_DIR/core/src/option.rs:LL:COL
error: aborting due to 2 previous errors
= note: for more information, visit https://doc.rust-lang.org/book/ch18-02-refutability.html
note: `Result<u32, !>` defined here
--> $SRC_DIR/core/src/result.rs:LL:COL
-$SRC_DIR/core/src/result.rs:LL:COL: not covered
+ ::: $SRC_DIR/core/src/result.rs:LL:COL
+ |
+ = note: not covered
= 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
|
where T: ?Sized;
note: required by a bound in `HashMap::<K, V, S>::get`
--> $SRC_DIR/std/src/collections/hash/map.rs:LL:COL
-$SRC_DIR/std/src/collections/hash/map.rs:LL:COL
-$SRC_DIR/std/src/collections/hash/map.rs:LL:COL
-$SRC_DIR/std/src/collections/hash/map.rs:LL:COL
help: consider specifying the generic argument
|
LL | .get::<Q>(&"key".into())
= note: wrap the `{integer}` in a closure with no arguments: `|| { /* code */ }`
note: required by a bound in `const_eval_select`
--> $SRC_DIR/core/src/intrinsics.rs:LL:COL
-$SRC_DIR/core/src/intrinsics.rs:LL:COL
-$SRC_DIR/core/src/intrinsics.rs:LL:COL
-$SRC_DIR/core/src/intrinsics.rs:LL:COL
-$SRC_DIR/core/src/intrinsics.rs:LL:COL
error: this argument must be a function item
--> $DIR/const-eval-select-bad.rs:10:31
= note: wrap the `{integer}` in a closure with no arguments: `|| { /* code */ }`
note: required by a bound in `const_eval_select`
--> $SRC_DIR/core/src/intrinsics.rs:LL:COL
-$SRC_DIR/core/src/intrinsics.rs:LL:COL
-$SRC_DIR/core/src/intrinsics.rs:LL:COL
-$SRC_DIR/core/src/intrinsics.rs:LL:COL
-$SRC_DIR/core/src/intrinsics.rs:LL:COL
error[E0271]: expected `fn(i32) -> bool {bar}` to be a fn item that returns `i32`, but it returns `bool`
--> $DIR/const-eval-select-bad.rs:32:34
|
note: required by a bound in `const_eval_select`
--> $SRC_DIR/core/src/intrinsics.rs:LL:COL
-$SRC_DIR/core/src/intrinsics.rs:LL:COL
-$SRC_DIR/core/src/intrinsics.rs:LL:COL
-$SRC_DIR/core/src/intrinsics.rs:LL:COL
-$SRC_DIR/core/src/intrinsics.rs:LL:COL
error[E0631]: type mismatch in function arguments
--> $DIR/const-eval-select-bad.rs:37:32
found function signature `fn(i32) -> _`
note: required by a bound in `const_eval_select`
--> $SRC_DIR/core/src/intrinsics.rs:LL:COL
-$SRC_DIR/core/src/intrinsics.rs:LL:COL
-$SRC_DIR/core/src/intrinsics.rs:LL:COL
-$SRC_DIR/core/src/intrinsics.rs:LL:COL
-$SRC_DIR/core/src/intrinsics.rs:LL:COL
error: this argument must be a `const fn`
--> $DIR/const-eval-select-bad.rs:42:29
|
note: required by a bound in `slice::<impl [T]>::sort`
--> $SRC_DIR/alloc/src/slice.rs:LL:COL
-$SRC_DIR/alloc/src/slice.rs:LL:COL
-$SRC_DIR/alloc/src/slice.rs:LL:COL
help: consider annotating `X` with `#[derive(Ord)]`
|
LL | #[derive(Ord)]
= help: the trait `FnMut<(_, char)>` is not implemented for `()`
note: required by a bound in `fold`
--> $SRC_DIR/core/src/iter/traits/iterator.rs:LL:COL
-$SRC_DIR/core/src/iter/traits/iterator.rs:LL:COL
-$SRC_DIR/core/src/iter/traits/iterator.rs:LL:COL
-$SRC_DIR/core/src/iter/traits/iterator.rs:LL:COL
error: aborting due to previous error
found type `u8`
note: required by a bound in `cloned`
--> $SRC_DIR/core/src/iter/traits/iterator.rs:LL:COL
-$SRC_DIR/core/src/iter/traits/iterator.rs:LL:COL
-$SRC_DIR/core/src/iter/traits/iterator.rs:LL:COL
-$SRC_DIR/core/src/iter/traits/iterator.rs:LL:COL
error[E0599]: the method `collect` exists for struct `Cloned<TakeWhile<&mut std::vec::IntoIter<u8>, [closure@$DIR/issue-31173.rs:7:21: 7:25]>>`, but its trait bounds were not satisfied
--> $DIR/issue-31173.rs:12:10
found tuple `(&_, &_)`
note: required by a bound in `cloned`
--> $SRC_DIR/core/src/iter/traits/iterator.rs:LL:COL
-$SRC_DIR/core/src/iter/traits/iterator.rs:LL:COL
-$SRC_DIR/core/src/iter/traits/iterator.rs:LL:COL
-$SRC_DIR/core/src/iter/traits/iterator.rs:LL:COL
error[E0271]: expected `std::collections::hash_map::Iter<'_, _, _>` to be an iterator that yields `&_`, but it yields `(&_, &_)`
--> $DIR/issue-33941.rs:6:14
| `Iterator::Item` is `&(_, _, _)` here
note: required by a bound in `collect`
--> $SRC_DIR/core/src/iter/traits/iterator.rs:LL:COL
-$SRC_DIR/core/src/iter/traits/iterator.rs:LL:COL
-$SRC_DIR/core/src/iter/traits/iterator.rs:LL:COL
error: aborting due to 2 previous errors
| ^^^^^^^^^^^ `Iterator::Item` is `&f64` here
note: required by a bound in `collect`
--> $SRC_DIR/core/src/iter/traits/iterator.rs:LL:COL
-$SRC_DIR/core/src/iter/traits/iterator.rs:LL:COL
-$SRC_DIR/core/src/iter/traits/iterator.rs:LL:COL
error[E0277]: a value of type `Vec<f64>` cannot be built from an iterator over elements of type `&f64`
--> $DIR/issue-66923-show-error-for-correct-call.rs:12:29
| ^^^^^^^^^^^ `Iterator::Item` is `&f64` here
note: required by a bound in `collect`
--> $SRC_DIR/core/src/iter/traits/iterator.rs:LL:COL
-$SRC_DIR/core/src/iter/traits/iterator.rs:LL:COL
-$SRC_DIR/core/src/iter/traits/iterator.rs:LL:COL
error: aborting due to 2 previous errors
= help: the trait `FromIterator<{integer}>` is not implemented for `[u32; 10]`
note: required by a bound in `collect`
--> $SRC_DIR/core/src/iter/traits/iterator.rs:LL:COL
-$SRC_DIR/core/src/iter/traits/iterator.rs:LL:COL
-$SRC_DIR/core/src/iter/traits/iterator.rs:LL:COL
error: aborting due to previous error
= help: the trait `Sized` is not implemented for `[i32]`
note: required by a bound in `collect`
--> $SRC_DIR/core/src/iter/traits/iterator.rs:LL:COL
-$SRC_DIR/core/src/iter/traits/iterator.rs:LL:COL
-$SRC_DIR/core/src/iter/traits/iterator.rs:LL:COL
error[E0277]: a slice of type `[i32]` cannot be built since `[i32]` has no definite size
--> $DIR/collect-into-slice.rs:6:38
= help: the trait `FromIterator<{integer}>` is not implemented for `[i32]`
note: required by a bound in `collect`
--> $SRC_DIR/core/src/iter/traits/iterator.rs:LL:COL
-$SRC_DIR/core/src/iter/traits/iterator.rs:LL:COL
-$SRC_DIR/core/src/iter/traits/iterator.rs:LL:COL
error: aborting due to 3 previous errors
| |__________^ `Iterator::Item` changed to `()` here
note: required by a bound in `std::iter::Iterator::sum`
--> $SRC_DIR/core/src/iter/traits/iterator.rs:LL:COL
-$SRC_DIR/core/src/iter/traits/iterator.rs:LL:COL
-$SRC_DIR/core/src/iter/traits/iterator.rs:LL:COL
-$SRC_DIR/core/src/iter/traits/iterator.rs:LL:COL
error[E0277]: a value of type `i32` cannot be made by summing an iterator over elements of type `()`
--> $DIR/invalid-iterator-chain.rs:18:14
| ^^^^^^^^^^^^^^^ `Iterator::Item` changed to `()` here
note: required by a bound in `std::iter::Iterator::sum`
--> $SRC_DIR/core/src/iter/traits/iterator.rs:LL:COL
-$SRC_DIR/core/src/iter/traits/iterator.rs:LL:COL
-$SRC_DIR/core/src/iter/traits/iterator.rs:LL:COL
-$SRC_DIR/core/src/iter/traits/iterator.rs:LL:COL
error[E0277]: a value of type `i32` cannot be made by summing an iterator over elements of type `f64`
--> $DIR/invalid-iterator-chain.rs:28:14
| -------------------- `Iterator::Item` remains `f64` here
note: required by a bound in `std::iter::Iterator::sum`
--> $SRC_DIR/core/src/iter/traits/iterator.rs:LL:COL
-$SRC_DIR/core/src/iter/traits/iterator.rs:LL:COL
-$SRC_DIR/core/src/iter/traits/iterator.rs:LL:COL
-$SRC_DIR/core/src/iter/traits/iterator.rs:LL:COL
error[E0277]: a value of type `i32` cannot be made by summing an iterator over elements of type `()`
--> $DIR/invalid-iterator-chain.rs:30:54
| this expression has type `Vec<{integer}>`
note: required by a bound in `std::iter::Iterator::sum`
--> $SRC_DIR/core/src/iter/traits/iterator.rs:LL:COL
-$SRC_DIR/core/src/iter/traits/iterator.rs:LL:COL
-$SRC_DIR/core/src/iter/traits/iterator.rs:LL:COL
-$SRC_DIR/core/src/iter/traits/iterator.rs:LL:COL
error[E0277]: a value of type `i32` cannot be made by summing an iterator over elements of type `&()`
--> $DIR/invalid-iterator-chain.rs:31:40
| this expression has type `Vec<()>`
note: required by a bound in `std::iter::Iterator::sum`
--> $SRC_DIR/core/src/iter/traits/iterator.rs:LL:COL
-$SRC_DIR/core/src/iter/traits/iterator.rs:LL:COL
-$SRC_DIR/core/src/iter/traits/iterator.rs:LL:COL
-$SRC_DIR/core/src/iter/traits/iterator.rs:LL:COL
error[E0277]: a value of type `Vec<i32>` cannot be built from an iterator over elements of type `()`
--> $DIR/invalid-iterator-chain.rs:40:25
| ----------------- `Iterator::Item` remains `()` here
note: required by a bound in `collect`
--> $SRC_DIR/core/src/iter/traits/iterator.rs:LL:COL
-$SRC_DIR/core/src/iter/traits/iterator.rs:LL:COL
-$SRC_DIR/core/src/iter/traits/iterator.rs:LL:COL
error: aborting due to 6 previous errors
= help: the trait `FromIterator<_>` is not implemented for `Bar`
note: required by a bound in `collect`
--> $SRC_DIR/core/src/iter/traits/iterator.rs:LL:COL
-$SRC_DIR/core/src/iter/traits/iterator.rs:LL:COL
-$SRC_DIR/core/src/iter/traits/iterator.rs:LL:COL
error: aborting due to previous error
= help: the trait `FromIterator<_>` is not implemented for `Foo`
note: required by a bound in `collect`
--> $SRC_DIR/core/src/iter/traits/iterator.rs:LL:COL
-$SRC_DIR/core/src/iter/traits/iterator.rs:LL:COL
-$SRC_DIR/core/src/iter/traits/iterator.rs:LL:COL
error[E0277]: a value of type `impl Debug` cannot be built from an iterator over elements of type `_`
--> $DIR/recursion4.rs:19:28
= help: the trait `FromIterator<_>` is not implemented for `impl Debug`
note: required by a bound in `collect`
--> $SRC_DIR/core/src/iter/traits/iterator.rs:LL:COL
-$SRC_DIR/core/src/iter/traits/iterator.rs:LL:COL
-$SRC_DIR/core/src/iter/traits/iterator.rs:LL:COL
error: aborting due to 2 previous errors
|
note: required by a bound in `map`
--> $SRC_DIR/core/src/iter/traits/iterator.rs:LL:COL
-$SRC_DIR/core/src/iter/traits/iterator.rs:LL:COL
-$SRC_DIR/core/src/iter/traits/iterator.rs:LL:COL
-$SRC_DIR/core/src/iter/traits/iterator.rs:LL:COL
error[E0593]: closure is expected to take a single 2-tuple as argument, but it takes 3 distinct arguments
--> $DIR/closure-arg-count.rs:27:57
|
note: required by a bound in `map`
--> $SRC_DIR/core/src/iter/traits/iterator.rs:LL:COL
-$SRC_DIR/core/src/iter/traits/iterator.rs:LL:COL
-$SRC_DIR/core/src/iter/traits/iterator.rs:LL:COL
-$SRC_DIR/core/src/iter/traits/iterator.rs:LL:COL
error[E0593]: function is expected to take a single 2-tuple as argument, but it takes 2 distinct arguments
--> $DIR/closure-arg-count.rs:29:57
|
note: required by a bound in `map`
--> $SRC_DIR/core/src/iter/traits/iterator.rs:LL:COL
-$SRC_DIR/core/src/iter/traits/iterator.rs:LL:COL
-$SRC_DIR/core/src/iter/traits/iterator.rs:LL:COL
-$SRC_DIR/core/src/iter/traits/iterator.rs:LL:COL
error[E0593]: function is expected to take 1 argument, but it takes 2 arguments
--> $DIR/closure-arg-count.rs:32:45
|
note: required by a bound in `map`
--> $SRC_DIR/core/src/iter/traits/iterator.rs:LL:COL
-$SRC_DIR/core/src/iter/traits/iterator.rs:LL:COL
-$SRC_DIR/core/src/iter/traits/iterator.rs:LL:COL
-$SRC_DIR/core/src/iter/traits/iterator.rs:LL:COL
error[E0593]: function is expected to take 0 arguments, but it takes 1 argument
--> $DIR/closure-arg-count.rs:35:10
found closure signature `fn((u32, u32)) -> _`
note: required by a bound in `map`
--> $SRC_DIR/core/src/iter/traits/iterator.rs:LL:COL
-$SRC_DIR/core/src/iter/traits/iterator.rs:LL:COL
-$SRC_DIR/core/src/iter/traits/iterator.rs:LL:COL
-$SRC_DIR/core/src/iter/traits/iterator.rs:LL:COL
error[E0631]: type mismatch in closure arguments
--> $DIR/closure-arg-type-mismatch.rs:4:14
found closure signature `for<'a> fn(&'a (u16, u16)) -> _`
note: required by a bound in `map`
--> $SRC_DIR/core/src/iter/traits/iterator.rs:LL:COL
-$SRC_DIR/core/src/iter/traits/iterator.rs:LL:COL
-$SRC_DIR/core/src/iter/traits/iterator.rs:LL:COL
-$SRC_DIR/core/src/iter/traits/iterator.rs:LL:COL
error[E0631]: type mismatch in closure arguments
--> $DIR/closure-arg-type-mismatch.rs:5:14
found closure signature `fn((u16, u16)) -> _`
note: required by a bound in `map`
--> $SRC_DIR/core/src/iter/traits/iterator.rs:LL:COL
-$SRC_DIR/core/src/iter/traits/iterator.rs:LL:COL
-$SRC_DIR/core/src/iter/traits/iterator.rs:LL:COL
-$SRC_DIR/core/src/iter/traits/iterator.rs:LL:COL
error: aborting due to 3 previous errors
found closure signature `for<'a> fn(&'a str) -> _`
note: required by a bound in `filter`
--> $SRC_DIR/core/src/iter/traits/iterator.rs:LL:COL
-$SRC_DIR/core/src/iter/traits/iterator.rs:LL:COL
-$SRC_DIR/core/src/iter/traits/iterator.rs:LL:COL
-$SRC_DIR/core/src/iter/traits/iterator.rs:LL:COL
error[E0599]: the method `count` exists for struct `Filter<Fuse<std::iter::Once<&str>>, [closure@$DIR/issue-36053-2.rs:7:39: 7:48]>`, but its trait bounds were not satisfied
--> $DIR/issue-36053-2.rs:7:55
|
note: required by a bound in `Option::<T>::map`
--> $SRC_DIR/core/src/option.rs:LL:COL
-$SRC_DIR/core/src/option.rs:LL:COL
-$SRC_DIR/core/src/option.rs:LL:COL
-$SRC_DIR/core/src/option.rs:LL:COL
error: aborting due to previous error
|
note: required by a bound in `Option::<T>::map`
--> $SRC_DIR/core/src/option.rs:LL:COL
-$SRC_DIR/core/src/option.rs:LL:COL
-$SRC_DIR/core/src/option.rs:LL:COL
-$SRC_DIR/core/src/option.rs:LL:COL
error[E0593]: function is expected to take 0 arguments, but it takes 1 argument
--> $DIR/issue-47706.rs:27:9
= note: add `#[derive(Debug)]` to `Foo` or manually `impl Debug for Foo`
note: required by a bound in `Result::<T, E>::unwrap`
--> $SRC_DIR/core/src/result.rs:LL:COL
-$SRC_DIR/core/src/result.rs:LL:COL
-$SRC_DIR/core/src/result.rs:LL:COL
help: consider annotating `Foo` with `#[derive(Debug)]`
|
LL | #[derive(Debug)]
| ^^^^^^
note: required by a bound in `spawn`
--> $SRC_DIR/std/src/thread/mod.rs:LL:COL
-$SRC_DIR/std/src/thread/mod.rs:LL:COL
-$SRC_DIR/std/src/thread/mod.rs:LL:COL
-$SRC_DIR/std/src/thread/mod.rs:LL:COL
-$SRC_DIR/std/src/thread/mod.rs:LL:COL
error: aborting due to previous error
| this expression has type `Vec<()>`
note: required by a bound in `std::iter::Iterator::sum`
--> $SRC_DIR/core/src/iter/traits/iterator.rs:LL:COL
-$SRC_DIR/core/src/iter/traits/iterator.rs:LL:COL
-$SRC_DIR/core/src/iter/traits/iterator.rs:LL:COL
-$SRC_DIR/core/src/iter/traits/iterator.rs:LL:COL
error[E0277]: a value of type `i32` cannot be made by multiplying all elements of type `&()` from an iterator
--> $DIR/sum.rs:7:25
| this expression has type `Vec<()>`
note: required by a bound in `std::iter::Iterator::product`
--> $SRC_DIR/core/src/iter/traits/iterator.rs:LL:COL
-$SRC_DIR/core/src/iter/traits/iterator.rs:LL:COL
-$SRC_DIR/core/src/iter/traits/iterator.rs:LL:COL
-$SRC_DIR/core/src/iter/traits/iterator.rs:LL:COL
error: aborting due to 2 previous errors
|
note: `Option<i32>` defined here
--> $SRC_DIR/core/src/option.rs:LL:COL
-$SRC_DIR/core/src/option.rs:LL:COL: not covered
+ ::: $SRC_DIR/core/src/option.rs:LL:COL
+ |
+ = note: not covered
= 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
|
|
note: `Option<HiddenEnum>` defined here
--> $SRC_DIR/core/src/option.rs:LL:COL
-$SRC_DIR/core/src/option.rs:LL:COL: not covered
+ ::: $SRC_DIR/core/src/option.rs:LL:COL
+ |
+ = note: not covered
= 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
|
|
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
= 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
|
|
note: `Option<Option<Direction>>` defined here
--> $SRC_DIR/core/src/option.rs:LL:COL
-$SRC_DIR/core/src/option.rs:LL:COL: not covered
-: not covered
+ ::: $SRC_DIR/core/src/option.rs:LL:COL
+ |
+ = note: not covered
+ |
+ = note: not covered
= note: the matched value is of type `Option<Option<Direction>>`
help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern or an explicit pattern as shown
|
|
note: `Option<Private>` defined here
--> $SRC_DIR/core/src/option.rs:LL:COL
-$SRC_DIR/core/src/option.rs:LL:COL: not covered
+ ::: $SRC_DIR/core/src/option.rs:LL:COL
+ |
+ = note: not covered
= 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
|
|
note: `Option<i32>` defined here
--> $SRC_DIR/core/src/option.rs:LL:COL
-$SRC_DIR/core/src/option.rs:LL:COL: not covered
+ ::: $SRC_DIR/core/src/option.rs:LL:COL
+ |
+ = note: not covered
= 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
|
= note: unsafe function cannot be called generically without an unsafe block
note: required by a bound in `ProcMacro::custom_derive`
--> $SRC_DIR/proc_macro/src/bridge/client.rs:LL:COL
-$SRC_DIR/proc_macro/src/bridge/client.rs:LL:COL
-$SRC_DIR/proc_macro/src/bridge/client.rs:LL:COL
-$SRC_DIR/proc_macro/src/bridge/client.rs:LL:COL
-$SRC_DIR/proc_macro/src/bridge/client.rs:LL:COL
error: aborting due to previous error
= note: for more information, visit https://doc.rust-lang.org/book/ch18-02-refutability.html
note: `Result<u32, &R<'_>>` defined here
--> $SRC_DIR/core/src/result.rs:LL:COL
-$SRC_DIR/core/src/result.rs:LL:COL: not covered
+ ::: $SRC_DIR/core/src/result.rs:LL:COL
+ |
+ = note: not covered
= 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: the trait `SliceIndex<[T]>` is implemented for `usize`
note: required by a bound in `core::str::<impl str>::get_unchecked_mut`
--> $SRC_DIR/core/src/str/mod.rs:LL:COL
-$SRC_DIR/core/src/str/mod.rs:LL:COL
-$SRC_DIR/core/src/str/mod.rs:LL:COL
-$SRC_DIR/core/src/str/mod.rs:LL:COL
error[E0277]: the type `str` cannot be indexed by `char`
--> $DIR/str-mut-idx.rs:13:7
where T: ?Sized;
note: required by a bound in `HashMap::<K, V, S>::get`
--> $SRC_DIR/std/src/collections/hash/map.rs:LL:COL
-$SRC_DIR/std/src/collections/hash/map.rs:LL:COL
-$SRC_DIR/std/src/collections/hash/map.rs:LL:COL
-$SRC_DIR/std/src/collections/hash/map.rs:LL:COL
help: consider specifying the generic argument
|
LL | opts.get::<Q>(opt.as_ref());
|
note: `Result<u32, &Void>` defined here
--> $SRC_DIR/core/src/result.rs:LL:COL
-$SRC_DIR/core/src/result.rs:LL:COL: not covered
+ ::: $SRC_DIR/core/src/result.rs:LL:COL
+ |
+ = note: not covered
= 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
|
|
note: `Result<u32, Void>` defined here
--> $SRC_DIR/core/src/result.rs:LL:COL
-$SRC_DIR/core/src/result.rs:LL:COL: not covered
+ ::: $SRC_DIR/core/src/result.rs:LL:COL
+ |
+ = note: not covered
= 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
|
= note: for more information, visit https://doc.rust-lang.org/book/ch18-02-refutability.html
note: `Result<u32, Void>` defined here
--> $SRC_DIR/core/src/result.rs:LL:COL
-$SRC_DIR/core/src/result.rs:LL:COL: not covered
+ ::: $SRC_DIR/core/src/result.rs:LL:COL
+ |
+ = note: not covered
= 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
|
LL | let _z = y.clone();
| ^^^^^ method cannot be called on `Box<dyn Foo>` due to unsatisfied trait bounds
--> $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: doesn't satisfy `Box<dyn Foo>: Clone`
+ ::: $SRC_DIR/alloc/src/boxed.rs:LL:COL
+ |
+ = note: doesn't satisfy `Box<dyn Foo>: Clone`
|
= note: the following trait bounds were not satisfied:
`dyn Foo: Sized`
LL | let _j = i.clone();
| ^^^^^ method cannot be called on `Box<R>` due to unsatisfied trait bounds
--> $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: doesn't satisfy `Box<R>: Clone`
+ ::: $SRC_DIR/alloc/src/boxed.rs:LL:COL
+ |
+ = note: doesn't satisfy `Box<R>: Clone`
|
= note: the following trait bounds were not satisfied:
`R: Clone`