mozilla/rust — pull request #8609 by alexcrichton (2013-08-19 06:23:54+00:00)
Title: Prepare bootstrapping priv-by-default struct fields

It seemed that the general consensus in #8122 was that struct fields should be private by default.

I had the brilliant idea to forbid `pub` on struct fields, so right now this change can't bootstrap. To get around this, I'm modifying it such that the next snapshot compiler will completely disregard all visibility qualifiers on fields of structs. That way after the next snapshot I can rampage through and swap out all the pub/priv qualifiers.

After this there's only one use-case of `priv`, and that's just making enum variants private in an otherwise public enum. I feel like this could be emulated with other semantics, just not as nicely, but regardless I think that struct fields should be private by default.