Fix cross-crate visibility of fictive variant constructors#59936
Fix cross-crate visibility of fictive variant constructors#59936bors merged 2 commits intorust-lang:masterfrom
Conversation
|
The alternative is to not change visibilities of the fictive variant constructors from (Of course, what I'd personally like is to un-reserve them already and remove braced variants from value namespace, they've been reserved for years without any concrete plans of use.) |
davidtwco
left a comment
There was a problem hiding this comment.
Good catch! This looks great, just one minor comment.
src/test/ui/rfc-2008-non-exhaustive/variants_fictive_visibility.rs
Outdated
Show resolved
Hide resolved
|
Updated. |
|
Great, thanks for making those changes! r=me when Travis finishes. |
|
@bors r=davidtwco |
|
📌 Commit dbc7042 has been approved by |
Fix cross-crate visibility of fictive variant constructors After merging rust-lang#59376 I realized that the code in the decoder wasn't entirely correct - we "decoded" fictive variant constructors with their variant's visibility, which could be public, rather than demoted to `pub(crate)`. Fictive constructors are not directly usable in expression/patterns, but the effect still can be observed with imports. r? @davidtwco
Fix cross-crate visibility of fictive variant constructors After merging rust-lang#59376 I realized that the code in the decoder wasn't entirely correct - we "decoded" fictive variant constructors with their variant's visibility, which could be public, rather than demoted to `pub(crate)`. Fictive constructors are not directly usable in expression/patterns, but the effect still can be observed with imports. r? @davidtwco
Rollup of 7 pull requests Successful merges: - #59856 (update polonius-engine) - #59877 (HirIdify hir::Def) - #59896 (Remove duplicated redundant spans) - #59900 (Remove [mut] syntax in pin docs) - #59906 (Make BufWriter use get_mut instead of manipulating inner in Write implementation) - #59936 (Fix cross-crate visibility of fictive variant constructors) - #59957 (Add missing backtick to Symbol documentation.) Failed merges: r? @ghost
|
Why is bor still testing after the PR is merged? |
|
@lzutao bors isn't really testing, the message is a bug. |
After merging #59376 I realized that the code in the decoder wasn't entirely correct - we "decoded" fictive variant constructors with their variant's visibility, which could be public, rather than demoted to
pub(crate).Fictive constructors are not directly usable in expression/patterns, but the effect still can be observed with imports.
r? @davidtwco