Uh oh!
There was an error while loading. Please reload this page.
Enable privacy check for enum methods. - #8370
Merged
Merged
Conversation
bors added a commit
that referenced
this pull request
Aug 10, 2013
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for freeto join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.