Skip to content

Enable privacy check for enum methods. - #8370

Merged
bors merged 1 commit into
rust-lang:masterfrom
michaelwoerister:enum-method-privacy
Aug 11, 2013
Merged

Enable privacy check for enum methods.#8370
bors merged 1 commit into
rust-lang:masterfrom
michaelwoerister:enum-method-privacy

Conversation

@michaelwoerister

Copy link
Copy Markdown
Member

As the title says. The fix is just one line in src/librustc/middle/privacy.rs. The other modifications are small errors revealed by the new check. This missing check could also lead to linker errors when using a non-public method in another crate.

bors added a commit that referenced this pull request Aug 10, 2013
This merges these PR together:
#8430: r=thestinger #8370: r=thestinger
#8386: r=bstrie
#8388: r=thestinger
#8390: r=graydon
#8394: r=graydon
#8402: r=thestinger
#8403: r=catamorphism
@bors
bors merged commit 2c9922a into rust-lang:masterAug 11, 2013
@michaelwoerister
michaelwoerister deleted the enum-method-privacy branch July 9, 2014 07:51
flip1995 pushed a commit to flip1995/rust that referenced this pull request Feb 10, 2022
Format `if_chain` invocations in clippy_utils
Not realizing it was [already obsolete](rust-lang/rust-clippy#8360), I built a [tool to format inside `if_chain` invocations](https://crates.io/crates/rustfmt_if_chain).
This PR applies the tool to clippy_utils. (If you apply it to clippy_lints, the changes are extensive.)
Anyway, I'm making it known here in case anyone wants to use it while `if-let` chain support is developed for `rustfmt`. (There could be a few Clippy PRs between now and then, and IMHO, the code looks better with the `if_chain` invocations formatted.)
Cheers.
---
changelog: none
U007D pushed a commit to U007D/rust-mos that referenced this pull request Aug 21, 2026
8371: Don't use HirDisplayWrapper when displaying SourceCode r=matklad a=Veykril
The issue was basically that when displaying for `DisplayTarget::SourceCode` some `hir_fmt` functions would create `HirDisplayWrapper`s which would then `fmt` these triggering the Display panic since `fmt::Display` can't fail the same way as `HirDisplay`. Simple fix is to just use `hir_fmt` directly. Should probably write that down somewhere in source, looking for a good spot to put that right now.
Fixesrust-lang#8077, Fixesrust-lang#8370
Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
Sign up for freeto 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.

3 participants

@michaelwoerister@thestinger@bors