Skip to content

Commit a1205fd

Browse files
committed
Bless clippy.
1 parent 49a83c8 commit a1205fd

File tree

6 files changed

+9
-5
lines changed

6 files changed

+9
-5
lines changed

src/tools/clippy/tests/ui-toml/unwrap_used/unwrap_used.fixed

+1
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,7 @@ mod issue9612 {
8686
util();
8787
}
8888

89+
#[allow(unconditional_panic)]
8990
fn util() {
9091
let _a: u8 = 4.try_into().unwrap();
9192
let _a: u8 = 5.try_into().expect("");

src/tools/clippy/tests/ui-toml/unwrap_used/unwrap_used.rs

+1
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,7 @@ mod issue9612 {
8686
util();
8787
}
8888

89+
#[allow(unconditional_panic)]
8990
fn util() {
9091
let _a: u8 = 4.try_into().unwrap();
9192
let _a: u8 = 5.try_into().expect("");

src/tools/clippy/tests/ui-toml/unwrap_used/unwrap_used.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -274,7 +274,7 @@ LL | let _ = &boxed_slice[1];
274274
| ~~~~~~~~~~~~~~~
275275

276276
error: called `.get().unwrap()` on a slice
277-
--> tests/ui-toml/unwrap_used/unwrap_used.rs:93:17
277+
--> tests/ui-toml/unwrap_used/unwrap_used.rs:94:17
278278
|
279279
LL | let _ = Box::new([0]).get(1).unwrap();
280280
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

src/tools/clippy/tests/ui/get_unwrap.fixed

+1
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,7 @@ fn main() {
7070
mod issue9909 {
7171
#![allow(clippy::identity_op, clippy::unwrap_used, dead_code)]
7272

73+
#[allow(unconditional_panic)]
7374
fn reduced() {
7475
let f = &[1, 2, 3];
7576

src/tools/clippy/tests/ui/get_unwrap.rs

+1
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,7 @@ fn main() {
7070
mod issue9909 {
7171
#![allow(clippy::identity_op, clippy::unwrap_used, dead_code)]
7272

73+
#[allow(unconditional_panic)]
7374
fn reduced() {
7475
let f = &[1, 2, 3];
7576

src/tools/clippy/tests/ui/get_unwrap.stderr

+4-4
Original file line numberDiff line numberDiff line change
@@ -266,7 +266,7 @@ LL | let _ = some_vec.get_mut(0..1).unwrap().to_vec();
266266
= help: consider using `expect()` to provide a better panic message
267267

268268
error: called `.get().unwrap()` on a slice
269-
--> tests/ui/get_unwrap.rs:77:24
269+
--> tests/ui/get_unwrap.rs:78:24
270270
|
271271
LL | let _x: &i32 = f.get(1 + 2).unwrap();
272272
| ^^^^^^^^^^^^^^^^^^^^^
@@ -277,7 +277,7 @@ LL | let _x: &i32 = &f[1 + 2];
277277
| ~~~~~~~~~
278278

279279
error: called `.get().unwrap()` on a slice
280-
--> tests/ui/get_unwrap.rs:80:18
280+
--> tests/ui/get_unwrap.rs:81:18
281281
|
282282
LL | let _x = f.get(1 + 2).unwrap().to_string();
283283
| ^^^^^^^^^^^^^^^^^^^^^
@@ -288,7 +288,7 @@ LL | let _x = f[1 + 2].to_string();
288288
| ~~~~~~~~
289289

290290
error: called `.get().unwrap()` on a slice
291-
--> tests/ui/get_unwrap.rs:83:18
291+
--> tests/ui/get_unwrap.rs:84:18
292292
|
293293
LL | let _x = f.get(1 + 2).unwrap().abs();
294294
| ^^^^^^^^^^^^^^^^^^^^^
@@ -299,7 +299,7 @@ LL | let _x = f[1 + 2].abs();
299299
| ~~~~~~~~
300300

301301
error: called `.get_mut().unwrap()` on a slice
302-
--> tests/ui/get_unwrap.rs:100:33
302+
--> tests/ui/get_unwrap.rs:101:33
303303
|
304304
LL | let b = rest.get_mut(linidx(j, k) - linidx(i, k) - 1).unwrap();
305305
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

0 commit comments

Comments
 (0)