fork/rust

git clone https://git.julia.blue/fork/rust

borsAuto merge of #103046 - JanBeh:PR_clarify_cmp_terminology, r=workingjubilee3bcad65fbf6

master
1.8 KiB47 linesraw
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   = help: to override `-D warnings` add `#[allow(clippy::nonsensical_open_options)]`
9
10error: file opened with `append` and `truncate`
11  --> $DIR/open_options.rs:9:5
12   |
13LL |     OpenOptions::new().append(true).truncate(true).open("foo.txt");
14   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
15
16error: the method `read` is called more than once
17  --> $DIR/open_options.rs:12:5
18   |
19LL |     OpenOptions::new().read(true).read(false).open("foo.txt");
20   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
21
22error: the method `create` is called more than once
23  --> $DIR/open_options.rs:14:5
24   |
25LL |     OpenOptions::new().create(true).create(false).open("foo.txt");
26   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
27
28error: the method `write` is called more than once
29  --> $DIR/open_options.rs:16:5
30   |
31LL |     OpenOptions::new().write(true).write(false).open("foo.txt");
32   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
33
34error: the method `append` is called more than once
35  --> $DIR/open_options.rs:18:5
36   |
37LL |     OpenOptions::new().append(true).append(false).open("foo.txt");
38   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
39
40error: the method `truncate` is called more than once
41  --> $DIR/open_options.rs:20:5
42   |
43LL |     OpenOptions::new().truncate(true).truncate(false).open("foo.txt");
44   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
45
46error: aborting due to 7 previous errors
47