diff options
| author | Esteban Küber <esteban@kuber.com.ar> | 2022-12-07 11:11:06 -0800 |
|---|---|---|
| committer | Esteban Küber <esteban@kuber.com.ar> | 2022-12-11 09:46:02 -0800 |
| commit | 71db025cfa85ea3c1e7d628f4c596ca498c7acf0 (patch) | |
| tree | 17572e8ecd0cd5aa7394ecd315d950f20f92d103 /src/test/ui/issues | |
| parent | 64bc975d27f86aaa1d3d94921c9c042477b4e88b (diff) | |
Account for method call chains split across multiple bindings
Diffstat (limited to 'src/test/ui/issues')
| -rw-r--r-- | src/test/ui/issues/issue-34334.stderr | 10 | ||||
| -rw-r--r-- | src/test/ui/issues/issue-66923-show-error-for-correct-call.stderr | 13 |
2 files changed, 13 insertions, 10 deletions
diff --git a/src/test/ui/issues/issue-34334.stderr b/src/test/ui/issues/issue-34334.stderr index eca961633dc..89f5c45d7a9 100644 --- a/src/test/ui/issues/issue-34334.stderr +++ b/src/test/ui/issues/issue-34334.stderr @@ -25,11 +25,13 @@ LL | let sr2: Vec<(u32, _, _)> = sr.iter().map(|(faction, th_sender, th_rece note: the method call chain might not have had the expected associated types --> $DIR/issue-34334.rs:5:36 | +LL | let sr: Vec<(u32, _, _) = vec![]; + | ------ this expression has type `Vec<(_, _, _)>` +... LL | let sr2: Vec<(u32, _, _)> = sr.iter().map(|(faction, th_sender, th_receiver)| {}).collect(); - | -- ^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ associated type `std::iter::Iterator::Item` changed to `()` here - | | | - | | associated type `std::iter::Iterator::Item` is `&(_, _, _)` here - | this expression has type `Vec<(_, _, _)>` + | ^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ associated type `std::iter::Iterator::Item` changed to `()` here + | | + | associated type `std::iter::Iterator::Item` is `&(_, _, _)` here note: required by a bound in `collect` --> $SRC_DIR/core/src/iter/traits/iterator.rs:LL:COL | diff --git a/src/test/ui/issues/issue-66923-show-error-for-correct-call.stderr b/src/test/ui/issues/issue-66923-show-error-for-correct-call.stderr index 7f97b5bfcbe..7fe786dcfb5 100644 --- a/src/test/ui/issues/issue-66923-show-error-for-correct-call.stderr +++ b/src/test/ui/issues/issue-66923-show-error-for-correct-call.stderr @@ -11,10 +11,10 @@ LL | let x2: Vec<f64> = x1.into_iter().collect(); note: the method call chain might not have had the expected associated types --> $DIR/issue-66923-show-error-for-correct-call.rs:8:27 | +LL | let x1: &[f64] = &v; + | -- this expression has type `&Vec<f64>` LL | let x2: Vec<f64> = x1.into_iter().collect(); - | -- ^^^^^^^^^^^ associated type `std::iter::Iterator::Item` is `&f64` here - | | - | this expression has type `&[f64]` + | ^^^^^^^^^^^ associated type `std::iter::Iterator::Item` is `&f64` here note: required by a bound in `collect` --> $SRC_DIR/core/src/iter/traits/iterator.rs:LL:COL | @@ -34,10 +34,11 @@ LL | let x3 = x1.into_iter().collect::<Vec<f64>>(); note: the method call chain might not have had the expected associated types --> $DIR/issue-66923-show-error-for-correct-call.rs:12:17 | +LL | let x1: &[f64] = &v; + | -- this expression has type `&Vec<f64>` +... LL | let x3 = x1.into_iter().collect::<Vec<f64>>(); - | -- ^^^^^^^^^^^ associated type `std::iter::Iterator::Item` is `&f64` here - | | - | this expression has type `&[f64]` + | ^^^^^^^^^^^ associated type `std::iter::Iterator::Item` is `&f64` here note: required by a bound in `collect` --> $SRC_DIR/core/src/iter/traits/iterator.rs:LL:COL | |
