Skip to content

Commit

Permalink
Add error markers to doubleended_iterator_last ui test
Browse files Browse the repository at this point in the history
  • Loading branch information
samueltardieu committed Feb 2, 2025
1 parent 916f168 commit 6b92d40
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions tests/ui/double_ended_iterator_last.fixed
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

// Typical case
pub fn last_arg(s: &str) -> Option<&str> {
s.split(' ').next_back()
s.split(' ').next_back() //~ ERROR: called `Iterator::last` on a `DoubleEndedIterator`
}

fn main() {
Expand All @@ -19,7 +19,7 @@ fn main() {
Some(())
}
}
let _ = DeIterator.next_back();
let _ = DeIterator.next_back(); //~ ERROR: called `Iterator::last` on a `DoubleEndedIterator`
// Should not apply to other methods of Iterator
let _ = DeIterator.count();

Expand Down
4 changes: 2 additions & 2 deletions tests/ui/double_ended_iterator_last.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

// Typical case
pub fn last_arg(s: &str) -> Option<&str> {
s.split(' ').last()
s.split(' ').last() //~ ERROR: called `Iterator::last` on a `DoubleEndedIterator`
}

fn main() {
Expand All @@ -19,7 +19,7 @@ fn main() {
Some(())
}
}
let _ = DeIterator.last();
let _ = DeIterator.last(); //~ ERROR: called `Iterator::last` on a `DoubleEndedIterator`
// Should not apply to other methods of Iterator
let _ = DeIterator.count();

Expand Down

0 comments on commit 6b92d40

Please sign in to comment.