]> git.lizzy.rs Git - rust.git/blob - src/tools/clippy/tests/ui/try_err.stderr
Auto merge of #84620 - Dylan-DPC:rollup-wkv97im, r=Dylan-DPC
[rust.git] / src / tools / clippy / tests / ui / try_err.stderr
1 error: returning an `Err(_)` with the `?` operator
2   --> $DIR/try_err.rs:19:9
3    |
4 LL |         Err(err)?;
5    |         ^^^^^^^^^ help: try this: `return Err(err)`
6    |
7 note: the lint level is defined here
8   --> $DIR/try_err.rs:4:9
9    |
10 LL | #![deny(clippy::try_err)]
11    |         ^^^^^^^^^^^^^^^
12
13 error: returning an `Err(_)` with the `?` operator
14   --> $DIR/try_err.rs:29:9
15    |
16 LL |         Err(err)?;
17    |         ^^^^^^^^^ help: try this: `return Err(err.into())`
18
19 error: returning an `Err(_)` with the `?` operator
20   --> $DIR/try_err.rs:49:17
21    |
22 LL |                 Err(err)?;
23    |                 ^^^^^^^^^ help: try this: `return Err(err)`
24
25 error: returning an `Err(_)` with the `?` operator
26   --> $DIR/try_err.rs:68:17
27    |
28 LL |                 Err(err)?;
29    |                 ^^^^^^^^^ help: try this: `return Err(err.into())`
30
31 error: returning an `Err(_)` with the `?` operator
32   --> $DIR/try_err.rs:87:23
33    |
34 LL |             Err(_) => Err(1)?,
35    |                       ^^^^^^^ help: try this: `return Err(1)`
36 ...
37 LL |     try_validation!(Ok::<_, i32>(5));
38    |     --------------------------------- in this macro invocation
39    |
40    = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)
41
42 error: returning an `Err(_)` with the `?` operator
43   --> $DIR/try_err.rs:102:23
44    |
45 LL |             Err(_) => Err(ret_one!())?,
46    |                       ^^^^^^^^^^^^^^^^ help: try this: `return Err(ret_one!())`
47 ...
48 LL |     try_validation_in_macro!(Ok::<_, i32>(5));
49    |     ------------------------------------------ in this macro invocation
50    |
51    = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)
52
53 error: returning an `Err(_)` with the `?` operator
54   --> $DIR/try_err.rs:141:9
55    |
56 LL |         Err(foo!())?;
57    |         ^^^^^^^^^^^^ help: try this: `return Err(foo!())`
58
59 error: returning an `Err(_)` with the `?` operator
60   --> $DIR/try_err.rs:148:9
61    |
62 LL |         Err(io::ErrorKind::WriteZero)?
63    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `return Poll::Ready(Err(io::ErrorKind::WriteZero.into()))`
64
65 error: returning an `Err(_)` with the `?` operator
66   --> $DIR/try_err.rs:150:9
67    |
68 LL |         Err(io::Error::new(io::ErrorKind::InvalidInput, "error"))?
69    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `return Poll::Ready(Err(io::Error::new(io::ErrorKind::InvalidInput, "error")))`
70
71 error: returning an `Err(_)` with the `?` operator
72   --> $DIR/try_err.rs:158:9
73    |
74 LL |         Err(io::ErrorKind::NotFound)?
75    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `return Poll::Ready(Some(Err(io::ErrorKind::NotFound.into())))`
76
77 error: returning an `Err(_)` with the `?` operator
78   --> $DIR/try_err.rs:167:16
79    |
80 LL |         return Err(42)?;
81    |                ^^^^^^^^ help: try this: `Err(42)`
82
83 error: aborting due to 11 previous errors
84