1 error: file opened with "truncate" and "read"
2 --> $DIR/open_options.rs:8:5
4 8 | OpenOptions::new().read(true).truncate(true).open("foo.txt"); //~ERROR file opened with "truncate" and "read"
5 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
7 note: lint level defined here
8 --> $DIR/open_options.rs:6:8
10 6 | #[deny(nonsensical_open_options)]
11 | ^^^^^^^^^^^^^^^^^^^^^^^^
13 error: file opened with "append" and "truncate"
14 --> $DIR/open_options.rs:9:5
16 9 | OpenOptions::new().append(true).truncate(true).open("foo.txt"); //~ERROR file opened with "append" and "truncate"
17 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
19 error: the method "read" is called more than once
20 --> $DIR/open_options.rs:11:5
22 11 | OpenOptions::new().read(true).read(false).open("foo.txt"); //~ERROR the method "read" is called more than once
23 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
25 error: the method "create" is called more than once
26 --> $DIR/open_options.rs:12:5
28 12 | OpenOptions::new().create(true).create(false).open("foo.txt"); //~ERROR the method "create" is called more than once
29 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
31 error: the method "write" is called more than once
32 --> $DIR/open_options.rs:13:5
34 13 | OpenOptions::new().write(true).write(false).open("foo.txt"); //~ERROR the method "write" is called more than once
35 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
37 error: the method "append" is called more than once
38 --> $DIR/open_options.rs:14:5
40 14 | OpenOptions::new().append(true).append(false).open("foo.txt"); //~ERROR the method "append" is called more than once
41 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
43 error: the method "truncate" is called more than once
44 --> $DIR/open_options.rs:15:5
46 15 | OpenOptions::new().truncate(true).truncate(false).open("foo.txt"); //~ERROR the method "truncate" is called more than once
47 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
49 error: aborting due to 7 previous errors