summary refs log tree commit diff
path: root/src/tools/clippy/tests/ui/try_err.stderr
blob: 3f1cbc17e72d08ff35e90bfc0e9333472d1473f8 (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
error: returning an `Err(_)` with the `?` operator
  --> $DIR/try_err.rs:18: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:28:9
   |
LL |         Err(err)?;
   |         ^^^^^^^^^ help: try this: `return Err(err.into())`

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

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

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

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

error: aborting due to 8 previous errors