Repository navigation
Conversation
The visibility witness trait that gates each #[store] method was emitted private, so a method returning impl Trait failed with E0446 (private trait in public interface) because the opaque type captures the where-bound. The witness trait is now pub; access is still gated by the marker struct's visibility.
Contributor
|
I'll fix CI failures and address comments from users with write access that start with 'Devin'.
|
ealmloff
approved these changes
Oct 23, 2026
This branch has not been deployed
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 free
to 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.
Summary
Since #5425 every
#[store]method carries a visibility witness bound,where Self: __XVisibleIn<Vis><__V>, andstores-macro/src/seal.rsemitted that witness trait private:The extension trait it is used in is
pub, which is fine for ordinary signatures (#[allow(private_bounds)]), but a method returningimpl Traithas the where-bound captured by its opaque type, so rustc rejects it with E0446 "private trait in public interface":Fix: emit the witness trait as
pub trait. Nothing else changes: the gating relies on the marker struct (#vis struct __XMarker<Vis>;) that is the only type implementing__XVisibleIn<Vis><_>for the store, so calling a private method from another module still fails with "type__XMarkerPrivateis private" (checked with a scratch crate), and the existing visibilitycompile_failtests pass.Adds a compile-time test in
packages/stores/tests/macro.rs(store_impl_returning_impl_trait) that fails with E0446 without the fix.Found while upgrading Blitz's browser app to 0.8.0-alpha.3 (DioxusLabs/blitz#1260), where
History::current_urlhad to be moved out of its#[store]block.Link to Devin session: https://dioxus.staging.devinenterprise.com/sessions/8451be47ca9a4d89ac073c7243d2a30e
Open in Devin Desktop: https://dioxus.staging.devinenterprise.com/desktop/session/8451be47ca9a4d89ac073c7243d2a30e?variant=devin-insiders
Requested by: @nicoburns