From f74063136375fec1208ab937314b0f4ca7f92cbe Mon Sep 17 00:00:00 2001 From: Andrew Paseltiner Date: Sun, 28 Aug 2016 19:21:04 -0400 Subject: [PATCH] Add test for #28324 Closes #28324 --- src/test/compile-fail/issue-28324.rs | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 src/test/compile-fail/issue-28324.rs diff --git a/src/test/compile-fail/issue-28324.rs b/src/test/compile-fail/issue-28324.rs new file mode 100644 index 0000000000000..13ce41f4dcc54 --- /dev/null +++ b/src/test/compile-fail/issue-28324.rs @@ -0,0 +1,18 @@ +// Copyright 2016 The Rust Project Developers. See the COPYRIGHT +// file at the top-level directory of this distribution and at +// http://rust-lang.org/COPYRIGHT. +// +// Licensed under the Apache License, Version 2.0 or the MIT license +// , at your +// option. This file may not be copied, modified, or distributed +// except according to those terms. + +extern { + static error_message_count: u32; +} + +pub static BAZ: u32 = *&error_message_count; +//~^ ERROR cannot refer to other statics by value + +fn main() {}