2019-10-05 10:55:58 -05:00
|
|
|
fn f<T>() {
|
|
|
|
extern "C" {
|
|
|
|
static a: *const T;
|
2023-09-10 16:06:14 -05:00
|
|
|
//~^ ERROR can't use generic parameters from outer item
|
2019-10-05 10:55:58 -05:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
fn g<T: Default>() {
|
|
|
|
static a: *const T = Default::default();
|
2023-09-10 16:06:14 -05:00
|
|
|
//~^ ERROR can't use generic parameters from outer item
|
2019-10-05 10:55:58 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
fn h<const N: usize>() {
|
|
|
|
extern "C" {
|
|
|
|
static a: [u8; N];
|
2023-09-10 16:06:14 -05:00
|
|
|
//~^ ERROR can't use generic parameters from outer item
|
2019-10-05 10:55:58 -05:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
fn i<const N: usize>() {
|
|
|
|
static a: [u8; N] = [0; N];
|
2023-09-10 16:06:14 -05:00
|
|
|
//~^ ERROR can't use generic parameters from outer item
|
|
|
|
//~| ERROR can't use generic parameters from outer item
|
2019-10-05 10:55:58 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
fn main() {}
|