mirror of
https://github.com/rust-lang/rust-clippy
synced 2024-12-21 10:33:27 +00:00
52 lines
1.3 KiB
Text
52 lines
1.3 KiB
Text
error: indexing may panic
|
|
--> tests/ui-toml/suppress_lint_in_const/test.rs:26:5
|
|
|
|
|
LL | x[index];
|
|
| ^^^^^^^^
|
|
|
|
|
= help: consider using `.get(n)` or `.get_mut(n)` instead
|
|
= note: `-D clippy::indexing-slicing` implied by `-D warnings`
|
|
= help: to override `-D warnings` add `#[allow(clippy::indexing_slicing)]`
|
|
|
|
error: indexing may panic
|
|
--> tests/ui-toml/suppress_lint_in_const/test.rs:41:5
|
|
|
|
|
LL | v[0];
|
|
| ^^^^
|
|
|
|
|
= help: consider using `.get(n)` or `.get_mut(n)` instead
|
|
|
|
error: indexing may panic
|
|
--> tests/ui-toml/suppress_lint_in_const/test.rs:42:5
|
|
|
|
|
LL | v[10];
|
|
| ^^^^^
|
|
|
|
|
= help: consider using `.get(n)` or `.get_mut(n)` instead
|
|
|
|
error: indexing may panic
|
|
--> tests/ui-toml/suppress_lint_in_const/test.rs:43:5
|
|
|
|
|
LL | v[1 << 3];
|
|
| ^^^^^^^^^
|
|
|
|
|
= help: consider using `.get(n)` or `.get_mut(n)` instead
|
|
|
|
error: indexing may panic
|
|
--> tests/ui-toml/suppress_lint_in_const/test.rs:49:5
|
|
|
|
|
LL | v[N];
|
|
| ^^^^
|
|
|
|
|
= help: consider using `.get(n)` or `.get_mut(n)` instead
|
|
|
|
error: indexing may panic
|
|
--> tests/ui-toml/suppress_lint_in_const/test.rs:50:5
|
|
|
|
|
LL | v[M];
|
|
| ^^^^
|
|
|
|
|
= help: consider using `.get(n)` or `.get_mut(n)` instead
|
|
|
|
error: aborting due to 6 previous errors
|
|
|