Skip to content

priv impls do not create private methods #3452

Description

@brson

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.

Activity

  1. catamorphism commented on Jan 25, 2013

    @catamorphism
    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.

  2. added a commit that references this issue on Apr 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions