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