rust/tests/ui/privacy/effective_visibilities_full_priv.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

22 lines
595 B
Rust
Raw Normal View History

#![feature(rustc_attrs)]
#![allow(private_interfaces)]
struct SemiPriv;
mod m {
#[rustc_effective_visibility]
struct Priv;
//~^ ERROR not in the table
//~| ERROR not in the table
#[rustc_effective_visibility]
pub fn foo() {} //~ ERROR Direct: pub(crate), Reexported: pub(crate), Reachable: pub(crate), ReachableThroughImplTrait: pub(crate)
#[rustc_effective_visibility]
impl crate::SemiPriv { //~ ERROR Direct: pub(crate), Reexported: pub(crate), Reachable: pub(crate), ReachableThroughImplTrait: pub(crate)
pub fn f(_: Priv) {}
}
}
fn main() {}