summaryrefslogtreecommitdiffstats
path: root/src/tools/clippy/tests/ui/try_err.stderr
blob: 4ad0e2e56a4d35ec616ddba8899ff083c051a889 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
error: returning an `Err(_)` with the `?` operator
  --> $DIR/try_err.rs:19:9
   |
LL |         Err(err)?;
   |         ^^^^^^^^^ help: try this: `return Err(err)`
   |
note: the lint level is defined here
  --> $DIR/try_err.rs:4:9
   |
LL | #![deny(clippy::try_err)]
   |         ^^^^^^^^^^^^^^^

error: returning an `Err(_)` with the `?` operator
  --> $DIR/try_err.rs:29:9
   |
LL |         Err(err)?;
   |         ^^^^^^^^^ help: try this: `return Err(err.into())`

error: returning an `Err(_)` with the `?` operator
  --> $DIR/try_err.rs:49:17
   |
LL |                 Err(err)?;
   |                 ^^^^^^^^^ help: try this: `return Err(err)`

error: returning an `Err(_)` with the `?` operator
  --> $DIR/try_err.rs:68:17
   |
LL |                 Err(err)?;
   |                 ^^^^^^^^^ help: try this: `return Err(err.into())`

error: returning an `Err(_)` with the `?` operator
  --> $DIR/try_err.rs:88:23
   |
LL |             Err(_) => Err(1)?,
   |                       ^^^^^^^ help: try this: `return Err(1)`
   |
   = note: this error originates in the macro `__inline_mac_fn_calling_macro` (in Nightly builds, run with -Z macro-backtrace for more info)

error: returning an `Err(_)` with the `?` operator
  --> $DIR/try_err.rs:95:23
   |
LL |             Err(_) => Err(inline!(1))?,
   |                       ^^^^^^^^^^^^^^^^ help: try this: `return Err(inline!(1))`
   |
   = note: this error originates in the macro `__inline_mac_fn_calling_macro` (in Nightly builds, run with -Z macro-backtrace for more info)

error: returning an `Err(_)` with the `?` operator
  --> $DIR/try_err.rs:122:9
   |
LL |         Err(inline!(inline!(String::from("aasdfasdfasdfa"))))?;
   |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `return Err(inline!(inline!(String::from("aasdfasdfasdfa"))))`

error: returning an `Err(_)` with the `?` operator
  --> $DIR/try_err.rs:129:9
   |
LL |         Err(io::ErrorKind::WriteZero)?
   |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `return Poll::Ready(Err(io::ErrorKind::WriteZero.into()))`

error: returning an `Err(_)` with the `?` operator
  --> $DIR/try_err.rs:131:9
   |
LL |         Err(io::Error::new(io::ErrorKind::InvalidInput, "error"))?
   |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `return Poll::Ready(Err(io::Error::new(io::ErrorKind::InvalidInput, "error")))`

error: returning an `Err(_)` with the `?` operator
  --> $DIR/try_err.rs:139:9
   |
LL |         Err(io::ErrorKind::NotFound)?
   |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `return Poll::Ready(Some(Err(io::ErrorKind::NotFound.into())))`

error: returning an `Err(_)` with the `?` operator
  --> $DIR/try_err.rs:148:16
   |
LL |         return Err(42)?;
   |                ^^^^^^^^ help: try this: `Err(42)`

error: aborting due to 11 previous errors