Skip to content
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

priv impls do not create private methods #3452

Closed
brson opened this issue Sep 10, 2012 · 1 comment
Closed

priv impls do not create private methods #3452

brson opened this issue Sep 10, 2012 · 1 comment
Assignees
Labels
A-trait-system Area: Trait system
Milestone

Comments

@brson
Copy link
Contributor

brson commented Sep 10, 2012

This suprised me:

impl foo {
  // This method is private
  priv fn bar() { }
}

priv impl foo {
  // This method is public even though the impl is private.
  fn bar() { }
}

priv impl doesn't do anything.

@catamorphism
Copy link
Contributor

My understanding is that impls just shouldn't allow pub/priv on the entire impl, so #3985 supersedes this.

Reopen if I've misunderstood.

RalfJung pushed a commit to RalfJung/rust that referenced this issue Apr 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-trait-system Area: Trait system
Projects
None yet
Development

No branches or pull requests

3 participants