Skip to content

Commit

Permalink
Correct error location indicated by comments
Browse files Browse the repository at this point in the history
  • Loading branch information
kleimkuhler committed Jan 18, 2019
1 parent 54f1124 commit b4766f8
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/test/ui/feature-gates/feature-gate-is_sorted.rs
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
fn main() {
// Assert `Iterator` methods are feature gated
assert!([1, 2, 2, 9].iter().is_sorted());
//^ ERROR: use of unstable library feature 'is_sorted'
//~^ ERROR: use of unstable library feature 'is_sorted': new API
assert!(![-2i32, -1, 0, 3].iter().is_sorted_by_key(|n| n.abs()));
//^ ERROR: use of unstable library feature 'is_sorted'
//~^ ERROR: use of unstable library feature 'is_sorted': new API

// Assert `[T]` methods are feature gated
assert!([1, 2, 2, 9].is_sorted());
//^ ERROR: use of unstable library feature 'is_sorted'
//~^ ERROR: use of unstable library feature 'is_sorted': new API
assert!(![-2i32, -1, 0, 3].is_sorted_by_key(|n| n.abs()));
//^ ERROR: use of unstable library feature 'is_sorted'
//~^ ERROR: use of unstable library feature 'is_sorted': new API
}

0 comments on commit b4766f8

Please sign in to comment.