You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Looks like my mistake. I thought from 0.10 compiler and manual that struct fields are public. And i did not realize that "Rust for C++ programmers" is newer than 0.10. But I see now that in the nigthly version of the manual struct fields are already "private".
Sorry.
Activity
pnkfelix commentedon May 7, 2014
Yes, they are private by default. (This was a change made ... semi-recently.)
What is leading you to think that they are not?
For further discussion, see the following tickets and RFC: #8122 , rust-lang/rfcs#1 , RFC 0004
(I will probably close this issue unless someone identifies an actual bug in the language or the documentation.)
ghost commentedon May 7, 2014
But the manual says:
"By default, everything in rust is private, with two exceptions. The first exception is that struct fields are public by default"
ghost commentedon May 7, 2014
Looks like my mistake. I thought from 0.10 compiler and manual that struct fields are public. And i did not realize that "Rust for C++ programmers" is newer than 0.10. But I see now that in the nigthly version of the manual struct fields are already "private".
Sorry.
fix version search in the website (rust-lang#14016)