2020-02-21 00:21:17 +00:00
|
|
|
// Check that nested items have their visibility and `default`nesses in the right order.
|
|
|
|
|
|
|
|
// pp-exact
|
|
|
|
|
2021-12-01 19:45:14 +00:00
|
|
|
fn main() {}
|
2020-02-21 00:21:17 +00:00
|
|
|
|
|
|
|
#[cfg(FALSE)]
|
|
|
|
extern "C" {
|
2021-12-29 19:35:50 +00:00
|
|
|
static X: u8;
|
2020-02-21 00:21:17 +00:00
|
|
|
type X;
|
|
|
|
fn foo();
|
2021-12-29 19:35:50 +00:00
|
|
|
pub static X: u8;
|
2020-02-21 00:21:17 +00:00
|
|
|
pub type X;
|
|
|
|
pub fn foo();
|
|
|
|
}
|
|
|
|
|
|
|
|
#[cfg(FALSE)]
|
|
|
|
trait T {
|
2021-12-29 19:35:50 +00:00
|
|
|
const X: u8;
|
2020-02-21 00:21:17 +00:00
|
|
|
type X;
|
|
|
|
fn foo();
|
2021-12-29 19:35:50 +00:00
|
|
|
default const X: u8;
|
2020-02-21 00:21:17 +00:00
|
|
|
default type X;
|
|
|
|
default fn foo();
|
2021-12-29 19:35:50 +00:00
|
|
|
pub const X: u8;
|
2020-02-21 00:21:17 +00:00
|
|
|
pub type X;
|
|
|
|
pub fn foo();
|
2021-12-29 19:35:50 +00:00
|
|
|
pub default const X: u8;
|
2020-02-21 00:21:17 +00:00
|
|
|
pub default type X;
|
|
|
|
pub default fn foo();
|
|
|
|
}
|
|
|
|
|
|
|
|
#[cfg(FALSE)]
|
|
|
|
impl T for S {
|
2021-12-29 19:35:50 +00:00
|
|
|
const X: u8;
|
2020-02-21 00:21:17 +00:00
|
|
|
type X;
|
|
|
|
fn foo();
|
2021-12-29 19:35:50 +00:00
|
|
|
default const X: u8;
|
2020-02-21 00:21:17 +00:00
|
|
|
default type X;
|
|
|
|
default fn foo();
|
2021-12-29 19:35:50 +00:00
|
|
|
pub const X: u8;
|
2020-02-21 00:21:17 +00:00
|
|
|
pub type X;
|
|
|
|
pub fn foo();
|
2021-12-29 19:35:50 +00:00
|
|
|
pub default const X: u8;
|
2020-02-21 00:21:17 +00:00
|
|
|
pub default type X;
|
|
|
|
pub default fn foo();
|
|
|
|
}
|