]> git.lizzy.rs Git - rust.git/blob - src/tools/clippy/tests/ui/open_options.stderr
Rollup merge of #102092 - kxxt:patch-1, r=joshtriplett
[rust.git] / src / tools / clippy / tests / ui / open_options.stderr
1 error: file opened with `truncate` and `read`
2   --> $DIR/open_options.rs:6:5
3    |
4 LL |     OpenOptions::new().read(true).truncate(true).open("foo.txt");
5    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
6    |
7    = note: `-D clippy::nonsensical-open-options` implied by `-D warnings`
8
9 error: file opened with `append` and `truncate`
10   --> $DIR/open_options.rs:7:5
11    |
12 LL |     OpenOptions::new().append(true).truncate(true).open("foo.txt");
13    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
14
15 error: the method `read` is called more than once
16   --> $DIR/open_options.rs:9:5
17    |
18 LL |     OpenOptions::new().read(true).read(false).open("foo.txt");
19    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
20
21 error: the method `create` is called more than once
22   --> $DIR/open_options.rs:10:5
23    |
24 LL |     OpenOptions::new().create(true).create(false).open("foo.txt");
25    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
26
27 error: the method `write` is called more than once
28   --> $DIR/open_options.rs:11:5
29    |
30 LL |     OpenOptions::new().write(true).write(false).open("foo.txt");
31    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
32
33 error: the method `append` is called more than once
34   --> $DIR/open_options.rs:12:5
35    |
36 LL |     OpenOptions::new().append(true).append(false).open("foo.txt");
37    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
38
39 error: the method `truncate` is called more than once
40   --> $DIR/open_options.rs:13:5
41    |
42 LL |     OpenOptions::new().truncate(true).truncate(false).open("foo.txt");
43    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
44
45 error: aborting due to 7 previous errors
46