Skip to content

Classes: make private fields and methods class-private, not instance-private #2297

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
catamorphism opened this issue Apr 25, 2012 · 3 comments
Labels
A-type-system Area: Type system
Milestone

Comments

@catamorphism
Copy link
Contributor

And add compile-fail tests to enforce this.

@ghost ghost assigned catamorphism Apr 25, 2012
@graydon
Copy link
Contributor

graydon commented Apr 25, 2012

To clarify, this means that two instances of the same class should be able to call one another's private methods?

@catamorphism
Copy link
Contributor Author

@graydon Yes. I actually am not personally in favor of this, but it is what @pcwalton 's original proposal said so I figured I ought to stick to it for now.

@brson
Copy link
Contributor

brson commented Aug 2, 2012

Obsolete with max/min classes.

@brson brson closed this as completed Aug 2, 2012
@catamorphism catamorphism removed their assignment Jun 16, 2014
bors added a commit to rust-lang-ci/rust that referenced this issue Sep 22, 2022
celinval added a commit to celinval/rust-dev that referenced this issue Jun 4, 2024
…ld scripts (rust-lang#2297)

We now pass `--cfg=kani` to build scripts, which allow users to use constructs such as `if cfg!(kani)` to conditionally compile their build scripts.

The build script may have logic that is not redundant to Kani, or even unsupported. Users can now change how their build works based on conditional compilation.

Co-authored-by: Kareem Khazem <karkhaz@amazon.com>
jieyouxu pushed a commit to jieyouxu/rust that referenced this issue Apr 2, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-type-system Area: Type system
Projects
None yet
Development

No branches or pull requests

3 participants