about summary refs log tree commit diff
path: root/src/tools/clippy/tests/ui/io_other_error.stderr
blob: b37e3d15064f5a69ac596c3b062ccbcc882a0e92 (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
error: this can be `std::io::Error::other(_)`
  --> tests/ui/io_other_error.rs:23:16
   |
LL |     let _err = std::io::Error::new(std::io::ErrorKind::Other, E);
   |                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   |
   = note: `-D clippy::io-other-error` implied by `-D warnings`
   = help: to override `-D warnings` add `#[allow(clippy::io_other_error)]`
help: use `std::io::Error::other`
   |
LL -     let _err = std::io::Error::new(std::io::ErrorKind::Other, E);
LL +     let _err = std::io::Error::other(E);
   |

error: this can be `std::io::Error::other(_)`
  --> tests/ui/io_other_error.rs:26:16
   |
LL |     let _err = std::io::Error::new(other, E);
   |                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   |
help: use `std::io::Error::other`
   |
LL -     let _err = std::io::Error::new(other, E);
LL +     let _err = std::io::Error::other(E);
   |

error: this can be `std::io::Error::other(_)`
  --> tests/ui/io_other_error.rs:45:20
   |
LL |         let _err = Error::new(ErrorKind::Other, super::E);
   |                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   |
help: use `std::io::Error::other`
   |
LL -         let _err = Error::new(ErrorKind::Other, super::E);
LL +         let _err = Error::other(super::E);
   |

error: this can be `std::io::Error::other(_)`
  --> tests/ui/io_other_error.rs:47:20
   |
LL |         let _err = io::Error::new(io::ErrorKind::Other, super::E);
   |                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   |
help: use `std::io::Error::other`
   |
LL -         let _err = io::Error::new(io::ErrorKind::Other, super::E);
LL +         let _err = io::Error::other(super::E);
   |

error: this can be `std::io::Error::other(_)`
  --> tests/ui/io_other_error.rs:58:5
   |
LL |     std::io::Error::new(std::io::ErrorKind::Other, format!("{x}"))
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   |
help: use `std::io::Error::other`
   |
LL -     std::io::Error::new(std::io::ErrorKind::Other, format!("{x}"))
LL +     std::io::Error::other(format!("{x}"))
   |

error: aborting due to 5 previous errors