]> git.lizzy.rs Git - rust.git/blob - tests/ui/open_options.stderr
Auto merge of #3635 - matthiaskrgr:revert_random_state_3603, r=xfix
[rust.git] / tests / ui / open_options.stderr
1 error: file opened with "truncate" and "read"
2   --> $DIR/open_options.rs:15: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:16: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:18: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:19: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:20: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:21: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:22:5
41    |
42 LL |     OpenOptions::new().truncate(true).truncate(false).open("foo.txt");
43    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
44
45 error: aborting due to 7 previous errors
46