Remove unnecessary comment

This commit is contained in:
Yuki Okushi 2020-02-04 01:29:11 +09:00
parent 7a36a8d98a
commit 49934e70a2
2 changed files with 3 additions and 7 deletions

View file

@ -22,10 +22,6 @@ fn main() {
v[10]; v[10];
v[1 << 3]; 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 N: usize = 15; // Out of bounds
const M: usize = 3; // In bounds const M: usize = 3; // In bounds
x[N]; // Ok, let rustc's `const_err` lint handle `usize` indexing on arrays. x[N]; // Ok, let rustc's `const_err` lint handle `usize` indexing on arrays.

View file

@ -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 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. LL | x[N]; // Ok, let rustc's `const_err` lint handle `usize` indexing on arrays.
| ^^^^ | ^^^^
@ -60,7 +60,7 @@ LL | v[1 << 3];
= help: Consider using `.get(n)` or `.get_mut(n)` instead = help: Consider using `.get(n)` or `.get_mut(n)` instead
error: indexing may panic. error: indexing may panic.
--> $DIR/indexing_slicing_index.rs:33:5 --> $DIR/indexing_slicing_index.rs:29:5
| |
LL | v[N]; LL | v[N];
| ^^^^ | ^^^^
@ -68,7 +68,7 @@ LL | v[N];
= help: Consider using `.get(n)` or `.get_mut(n)` instead = help: Consider using `.get(n)` or `.get_mut(n)` instead
error: indexing may panic. error: indexing may panic.
--> $DIR/indexing_slicing_index.rs:34:5 --> $DIR/indexing_slicing_index.rs:30:5
| |
LL | v[M]; LL | v[M];
| ^^^^ | ^^^^