Skip to content

minor fix about visibility in reference#38215

Merged
bors merged 2 commits into
rust-lang:masterfrom
liigo:patch-12
Dec 21, 2016
Merged

minor fix about visibility in reference#38215
bors merged 2 commits into
rust-lang:masterfrom
liigo:patch-12

Conversation

@liigo

@liigo liigo commented Dec 7, 2016

Copy link
Copy Markdown
Contributor

No description provided.

@rust-highfive

Copy link
Copy Markdown
Contributor

r? @steveklabnik

(rust_highfive has picked a reviewer for you, use r? to override)

@KalitaAlexey

Copy link
Copy Markdown
Contributor

You mentioned that trait items are public by default. Can I make a trait item private?

@liigo

liigo commented Dec 7, 2016

Copy link
Copy Markdown
Contributor Author

you can't, at least currently, we don't use priv keyword any more.

Comment thread src/doc/reference.md Outdated

@petrochenkov petrochenkov Dec 7, 2016

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Associated items and variants are not public by default, they inherit visibility from their traits and enums respectively. E.g.

pub(vis) trait Tr {
    fn f();
}

is "desugared" into

pub(vis) trait Tr {
    pub(vis) fn f(); // (Not syntactically legal now)
}

@steveklabnik

Copy link
Copy Markdown
Contributor

Looks like @petrochenkov 's feedback needs to be addressed.

@liigo

liigo commented Dec 13, 2016

Copy link
Copy Markdown
Contributor Author

done.

@petrochenkov

Copy link
Copy Markdown
Contributor

@bors r+ rollup

@bors

bors commented Dec 13, 2016

Copy link
Copy Markdown
Collaborator

📌 Commit e095c71 has been approved by petrochenkov

GuillaumeGomez added a commit to GuillaumeGomez/rust that referenced this pull request Dec 15, 2016
minor fix about visibility in reference
GuillaumeGomez added a commit to GuillaumeGomez/rust that referenced this pull request Dec 16, 2016
minor fix about visibility in reference
@bors

bors commented Dec 16, 2016

Copy link
Copy Markdown
Collaborator

⌛ Testing commit e095c71 with merge 69aa86a...

@bors

bors commented Dec 16, 2016

Copy link
Copy Markdown
Collaborator

💔 Test failed - auto-mac-64-opt-rustbuild

@GuillaumeGomez

Copy link
Copy Markdown
Member

@bors: retry

@bors

bors commented Dec 16, 2016

Copy link
Copy Markdown
Collaborator

⌛ Testing commit e095c71 with merge dea9316...

@bors

bors commented Dec 16, 2016

Copy link
Copy Markdown
Collaborator

💔 Test failed - auto-mac-64-opt-rustbuild

@alexcrichton

alexcrichton commented Dec 16, 2016 via email

Copy link
Copy Markdown
Member

GuillaumeGomez added a commit to GuillaumeGomez/rust that referenced this pull request Dec 18, 2016
minor fix about visibility in reference
@sanxiyn

sanxiyn commented Dec 19, 2016

Copy link
Copy Markdown
Contributor

@bors retry

@alexcrichton

Copy link
Copy Markdown
Member

@bors: retry

alexcrichton added a commit to alexcrichton/rust that referenced this pull request Dec 20, 2016
minor fix about visibility in reference
bors added a commit that referenced this pull request Dec 20, 2016
@bors bors merged commit e095c71 into rust-lang:master Dec 21, 2016
@liigo liigo deleted the patch-12 branch November 13, 2025 03:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

9 participants