Sign in
rust
/
rust-lang
/
rust
/
refs/heads/perf-tmp
/
.
/
tests
/
ui
/
parser
/
foreign-const-syntactic-fail.rs
blob: fc3cd0b3430dfee39dcf37d801971b63e7fd8010 [
file
] [
log
] [
blame
]
// 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`
}