-
Notifications
You must be signed in to change notification settings - Fork 13k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Rollup merge of #108609 - clubby789:e0599-highlight, r=estebank
Highlight whole expression for E0599 Fixes #108603 This adds a secondary label to highlight the whole expression leading to the error. It also prevents empty labels being recognised as 'unexpected' by compiletest - otherwise, tests with NOTE annotations would pick up empty labels. `@rustbot` label +A-diagnostics
- Loading branch information
Showing
4 changed files
with
31 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -24,8 +24,17 @@ note: required by a bound in `cloned` | |
error[E0599]: the method `collect` exists for struct `Cloned<TakeWhile<&mut IntoIter<u8>, [[email protected]: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 = &_` | ||
|