summaryrefslogtreecommitdiffstats
path: root/src/test/ui/cross-crate/const-cross-crate-extern.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/ui/cross-crate/const-cross-crate-extern.rs')
-rw-r--r--src/test/ui/cross-crate/const-cross-crate-extern.rs11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/test/ui/cross-crate/const-cross-crate-extern.rs b/src/test/ui/cross-crate/const-cross-crate-extern.rs
new file mode 100644
index 000000000..3c61afd5b
--- /dev/null
+++ b/src/test/ui/cross-crate/const-cross-crate-extern.rs
@@ -0,0 +1,11 @@
+// run-pass
+// aux-build:cci_const.rs
+#![allow(non_upper_case_globals)]
+
+extern crate cci_const;
+use cci_const::bar;
+static foo: extern "C" fn() = bar;
+
+pub fn main() {
+ assert!(foo == bar);
+}