fork/rust

git clone https://git.julia.blue/fork/rust

borsAuto merge of #103046 - JanBeh:PR_clarify_cmp_terminology, r=workingjubilee3bcad65fbf6

master
1.5 KiB54 linesraw
1error: used `unwrap()` on an `Option` value
2  --> $DIR/unwrap_expect_used.rs:27:5
3   |
4LL |     Some(3).unwrap();
5   |     ^^^^^^^^^^^^^^^^
6   |
7   = note: if this value is `None`, it will panic
8   = note: `-D clippy::unwrap-used` implied by `-D warnings`
9   = help: to override `-D warnings` add `#[allow(clippy::unwrap_used)]`
10
11error: used `expect()` on an `Option` value
12  --> $DIR/unwrap_expect_used.rs:29:5
13   |
14LL |     Some(3).expect("Hello world!");
15   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
16   |
17   = note: if this value is `None`, it will panic
18   = note: `-D clippy::expect-used` implied by `-D warnings`
19   = help: to override `-D warnings` add `#[allow(clippy::expect_used)]`
20
21error: used `unwrap()` on a `Result` value
22  --> $DIR/unwrap_expect_used.rs:45:5
23   |
24LL |     a.unwrap();
25   |     ^^^^^^^^^^
26   |
27   = note: if this value is an `Err`, it will panic
28
29error: used `expect()` on a `Result` value
30  --> $DIR/unwrap_expect_used.rs:47:5
31   |
32LL |     a.expect("Hello world!");
33   |     ^^^^^^^^^^^^^^^^^^^^^^^^
34   |
35   = note: if this value is an `Err`, it will panic
36
37error: used `unwrap_err()` on a `Result` value
38  --> $DIR/unwrap_expect_used.rs:49:5
39   |
40LL |     a.unwrap_err();
41   |     ^^^^^^^^^^^^^^
42   |
43   = note: if this value is an `Ok`, it will panic
44
45error: used `expect_err()` on a `Result` value
46  --> $DIR/unwrap_expect_used.rs:51:5
47   |
48LL |     a.expect_err("Hello error!");
49   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
50   |
51   = note: if this value is an `Ok`, it will panic
52
53error: aborting due to 6 previous errors
54