It is not clear to me how to apply lexical-based privacy rules to
method calls, though I am not opposed. How can we determine if the
module where the method is declared is exported? I guess that the idea
is simply to climb the module hierarchy, checking that each module
between the declaration of
@mozilla.org
Sent: Monday, September 30, 2013 2:36:01 PM
Subject: Re: [rust-dev] Crate-scoped non-trait implementations
From what I've seen, privacy is tricky enough as-is, so I think we
should try to avoid new rules and new keywords. That being said, this
may be possible by just actually applying
Given the proposed privacy resolution rules (
https://github.com/mozilla/rust/issues/8215#issuecomment-24762188 )
there exists a concept of crate-scope for items: these can be used
within the implementation of the crate, but are inaccessible from other
crates. This is easy to do by introducing