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