]> git.proxmox.com Git - rustc.git/blob - src/tools/clippy/tests/ui/open_options.stderr
New upstream version 1.23.0+dfsg1
[rustc.git] / src / tools / clippy / tests / ui / open_options.stderr
1 error: file opened with "truncate" and "read"
2 --> $DIR/open_options.rs:8:5
3 |
4 8 | OpenOptions::new().read(true).truncate(true).open("foo.txt");
5 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
6 |
7 = note: `-D nonsensical-open-options` implied by `-D warnings`
8
9 error: file opened with "append" and "truncate"
10 --> $DIR/open_options.rs:9:5
11 |
12 9 | 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:11:5
17 |
18 11 | 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:12:5
23 |
24 12 | 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:13:5
29 |
30 13 | 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:14:5
35 |
36 14 | 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:15:5
41 |
42 15 | OpenOptions::new().truncate(true).truncate(false).open("foo.txt");
43 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
44