2023-03-28 16:26:41 +00:00
|
|
|
#![rustc_effective_visibility] //~ ERROR Direct: pub, Reexported: pub, Reachable: pub, ReachableThroughImplTrait: pub
|
2022-09-22 13:19:53 +00:00
|
|
|
#![feature(rustc_attrs)]
|
|
|
|
|
|
|
|
#[rustc_effective_visibility]
|
|
|
|
mod outer { //~ ERROR Direct: pub(crate), Reexported: pub(crate), Reachable: pub(crate), ReachableThroughImplTrait: pub(crate)
|
|
|
|
#[rustc_effective_visibility]
|
|
|
|
pub mod inner1 { //~ ERROR Direct: pub(crate), Reexported: pub, Reachable: pub, ReachableThroughImplTrait: pub
|
|
|
|
|
|
|
|
#[rustc_effective_visibility]
|
2022-10-28 10:58:21 +00:00
|
|
|
extern "C" {} //~ ERROR not in the table
|
2022-09-22 13:19:53 +00:00
|
|
|
|
|
|
|
#[rustc_effective_visibility]
|
|
|
|
pub trait PubTrait { //~ ERROR Direct: pub(crate), Reexported: pub, Reachable: pub, ReachableThroughImplTrait: pub
|
|
|
|
#[rustc_effective_visibility]
|
|
|
|
const A: i32; //~ ERROR Direct: pub(crate), Reexported: pub, Reachable: pub, ReachableThroughImplTrait: pub
|
|
|
|
#[rustc_effective_visibility]
|
|
|
|
type B; //~ ERROR Direct: pub(crate), Reexported: pub, Reachable: pub, ReachableThroughImplTrait: pub
|
|
|
|
}
|
|
|
|
|
|
|
|
#[rustc_effective_visibility]
|
2022-11-23 16:19:06 +00:00
|
|
|
struct PrivStruct; //~ ERROR Direct: pub(self), Reexported: pub(self), Reachable: pub(self), ReachableThroughImplTrait: pub(self)
|
|
|
|
//~| ERROR Direct: pub(self), Reexported: pub(self), Reachable: pub(self), ReachableThroughImplTrait: pub(self)
|
2022-09-22 13:19:53 +00:00
|
|
|
|
|
|
|
#[rustc_effective_visibility]
|
|
|
|
pub union PubUnion { //~ ERROR Direct: pub(crate), Reexported: pub, Reachable: pub, ReachableThroughImplTrait: pub
|
|
|
|
#[rustc_effective_visibility]
|
2022-11-23 16:19:06 +00:00
|
|
|
a: u8, //~ ERROR Direct: pub(self), Reexported: pub(self), Reachable: pub(self), ReachableThroughImplTrait: pub(self)
|
2022-09-22 13:19:53 +00:00
|
|
|
#[rustc_effective_visibility]
|
|
|
|
pub b: u8, //~ ERROR Direct: pub(crate), Reexported: pub, Reachable: pub, ReachableThroughImplTrait: pub
|
|
|
|
}
|
|
|
|
|
|
|
|
#[rustc_effective_visibility]
|
|
|
|
pub enum Enum { //~ ERROR Direct: pub(crate), Reexported: pub, Reachable: pub, ReachableThroughImplTrait: pub
|
|
|
|
#[rustc_effective_visibility]
|
|
|
|
A( //~ ERROR Direct: pub(crate), Reexported: pub, Reachable: pub, ReachableThroughImplTrait: pub
|
2022-11-04 12:28:03 +00:00
|
|
|
//~| ERROR Direct: pub(crate), Reexported: pub, Reachable: pub, ReachableThroughImplTrait: pub
|
2022-09-22 13:19:53 +00:00
|
|
|
#[rustc_effective_visibility]
|
|
|
|
PubUnion, //~ ERROR Direct: pub(crate), Reexported: pub, Reachable: pub, ReachableThroughImplTrait: pub
|
|
|
|
),
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
#[rustc_effective_visibility]
|
2022-10-30 11:55:58 +00:00
|
|
|
macro_rules! none_macro { //~ ERROR not in the table
|
2022-09-22 13:19:53 +00:00
|
|
|
() => {};
|
|
|
|
}
|
|
|
|
|
|
|
|
#[macro_export]
|
|
|
|
#[rustc_effective_visibility]
|
2022-10-30 11:55:58 +00:00
|
|
|
macro_rules! public_macro { //~ ERROR Direct: pub(self), Reexported: pub, Reachable: pub, ReachableThroughImplTrait: pub
|
2022-09-22 13:19:53 +00:00
|
|
|
() => {};
|
|
|
|
}
|
|
|
|
|
|
|
|
#[rustc_effective_visibility]
|
|
|
|
pub struct ReachableStruct { //~ ERROR Direct: pub(crate), Reexported: pub(crate), Reachable: pub, ReachableThroughImplTrait: pub
|
|
|
|
#[rustc_effective_visibility]
|
|
|
|
pub a: u8, //~ ERROR Direct: pub(crate), Reexported: pub(crate), Reachable: pub, ReachableThroughImplTrait: pub
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
#[rustc_effective_visibility]
|
|
|
|
pub use outer::inner1; //~ ERROR Direct: pub, Reexported: pub, Reachable: pub, ReachableThroughImplTrait: pub
|
|
|
|
|
|
|
|
pub fn foo() -> outer::ReachableStruct { outer::ReachableStruct {a: 0} }
|
|
|
|
|
|
|
|
mod half_public_import {
|
|
|
|
#[rustc_effective_visibility]
|
|
|
|
pub type HalfPublicImport = u8; //~ ERROR Direct: pub(crate), Reexported: pub, Reachable: pub, ReachableThroughImplTrait: pub
|
|
|
|
#[rustc_effective_visibility]
|
|
|
|
#[allow(non_upper_case_globals)]
|
|
|
|
pub(crate) const HalfPublicImport: u8 = 0; //~ ERROR Direct: pub(crate), Reexported: pub(crate), Reachable: pub(crate), ReachableThroughImplTrait: pub(crate)
|
|
|
|
}
|
|
|
|
|
|
|
|
#[rustc_effective_visibility]
|
|
|
|
pub use half_public_import::HalfPublicImport; //~ ERROR Direct: pub, Reexported: pub, Reachable: pub, ReachableThroughImplTrait: pub
|
|
|
|
|
|
|
|
fn main() {}
|