diff options
author | clubby789 <jamie@hill-daniel.co.uk> | 2023-03-01 14:32:46 +0000 |
---|---|---|
committer | clubby789 <jamie@hill-daniel.co.uk> | 2023-03-01 16:57:11 +0000 |
commit | 6c2a952b5637f4795ad1d3ed08dfa4f43eaece51 (patch) | |
tree | 5df7a2b1064fd754bf4b318c3631948166bc6e3d /tests/ui/typeck | |
parent | 64165aac68af780182ff89a6eb3982e3c262266e (diff) | |
download | rust-6c2a952b5637f4795ad1d3ed08dfa4f43eaece51.tar.gz |
Highlight whole expression for E0599
Diffstat (limited to 'tests/ui/typeck')
-rw-r--r-- | tests/ui/typeck/issue-31173.stderr | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/tests/ui/typeck/issue-31173.stderr b/tests/ui/typeck/issue-31173.stderr index 8346c9a0aae..b622122f33e 100644 --- a/tests/ui/typeck/issue-31173.stderr +++ b/tests/ui/typeck/issue-31173.stderr @@ -24,8 +24,17 @@ note: required by a bound in `cloned` error[E0599]: the method `collect` exists for struct `Cloned<TakeWhile<&mut IntoIter<u8>, [closure@issue-31173.rs:7:21]>>`, but its trait bounds were not satisfied --> $DIR/issue-31173.rs:12:10 | -LL | .collect(); - | ^^^^^^^ method cannot be called due to unsatisfied trait bounds +LL | let temp: Vec<u8> = it + | _________________________- +LL | | .take_while(|&x| { +LL | | found_e = true; +LL | | false +LL | | }) +LL | | .cloned() +LL | | .collect(); + | | -^^^^^^^ method cannot be called due to unsatisfied trait bounds + | |_________| + | --> $SRC_DIR/core/src/iter/adapters/take_while.rs:LL:COL | = note: doesn't satisfy `<_ as Iterator>::Item = &_` |