about summary refs log tree commit diff
path: root/tests/ui/parser/foreign-const-syntactic-fail.rs
blob: fc3cd0b3430dfee39dcf37d801971b63e7fd8010 (plain)
1
2
3
4
5
6
7
8
9
// Syntactically, a `const` item inside an `extern { ... }` block is not allowed.

fn main() {}

#[cfg(false)]
extern "C" {
    const A: isize; //~ ERROR extern items cannot be `const`
    const B: isize = 42; //~ ERROR extern items cannot be `const`
}