Skip to content

Commit

Permalink
Remove unnecessary comment
Browse files Browse the repository at this point in the history
  • Loading branch information
JohnTitor committed Feb 3, 2020
1 parent 7a36a8d commit 49934e7
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 7 deletions.
4 changes: 0 additions & 4 deletions tests/ui/indexing_slicing_index.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,6 @@ fn main() {
v[10];
v[1 << 3];

//
// Continue tests at end function to minimize the changes to this file's corresponding stderr.
//

const N: usize = 15; // Out of bounds
const M: usize = 3; // In bounds
x[N]; // Ok, let rustc's `const_err` lint handle `usize` indexing on arrays.
Expand Down
6 changes: 3 additions & 3 deletions tests/ui/indexing_slicing_index.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ LL | x[1 << 3]; // Ok, let rustc's `const_err` lint handle `usize` indexing
| ^^^^^^^^^

error: index out of bounds: the len is 4 but the index is 15
--> $DIR/indexing_slicing_index.rs:31:5
--> $DIR/indexing_slicing_index.rs:27:5
|
LL | x[N]; // Ok, let rustc's `const_err` lint handle `usize` indexing on arrays.
| ^^^^
Expand Down Expand Up @@ -60,15 +60,15 @@ LL | v[1 << 3];
= help: Consider using `.get(n)` or `.get_mut(n)` instead

error: indexing may panic.
--> $DIR/indexing_slicing_index.rs:33:5
--> $DIR/indexing_slicing_index.rs:29:5
|
LL | v[N];
| ^^^^
|
= help: Consider using `.get(n)` or `.get_mut(n)` instead

error: indexing may panic.
--> $DIR/indexing_slicing_index.rs:34:5
--> $DIR/indexing_slicing_index.rs:30:5
|
LL | v[M];
| ^^^^
Expand Down

0 comments on commit 49934e7

Please sign in to comment.