fork/rust

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

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

master
1.3 KiB40 linesraw
1error[E0616]: field `priv_field` of struct `MyStruct` is private
2  --> $DIR/issue-3763.rs:17:32
3   |
4LL |     let _woohoo = (&my_struct).priv_field;
5   |                                ^^^^^^^^^^ private field
6
7error[E0616]: field `priv_field` of struct `MyStruct` is private
8  --> $DIR/issue-3763.rs:20:41
9   |
10LL |     let _woohoo = (Box::new(my_struct)).priv_field;
11   |                                         ^^^^^^^^^^ private field
12
13error[E0624]: method `happyfun` is private
14  --> $DIR/issue-3763.rs:23:18
15   |
16LL |         fn happyfun(&self) {}
17   |         ------------------ private method defined here
18...
19LL |     (&my_struct).happyfun();
20   |                  ^^^^^^^^ private method
21
22error[E0624]: method `happyfun` is private
23  --> $DIR/issue-3763.rs:25:27
24   |
25LL |         fn happyfun(&self) {}
26   |         ------------------ private method defined here
27...
28LL |     (Box::new(my_struct)).happyfun();
29   |                           ^^^^^^^^ private method
30
31error[E0616]: field `priv_field` of struct `MyStruct` is private
32  --> $DIR/issue-3763.rs:26:26
33   |
34LL |     let nope = my_struct.priv_field;
35   |                          ^^^^^^^^^^ private field
36
37error: aborting due to 5 previous errors
38
39Some errors have detailed explanations: E0616, E0624.
40For more information about an error, try `rustc --explain E0616`.