fork/rust

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

borsAuto merge of #69444 - pietroalbini:stable-next-final-v2-new, r=pietroalbinif3e1a954d2e

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