about summary refs log tree commit diff
path: root/src/test/auxiliary
diff options
context:
space:
mode:
authorAlex Crichton <alex@alexcrichton.com>2014-07-09 19:13:28 -0700
committerAlex Crichton <alex@alexcrichton.com>2014-07-10 07:51:50 -0700
commitfe48c3b620fa25d4159fd493f5035d081dc4a79a (patch)
tree8c1dc1c9ef993fc3bd80fd2cd3edf93c679d638f /src/test/auxiliary
parent3f3291e0c7d9d189553b16c52dda3851423534a5 (diff)
downloadrust-fe48c3b620fa25d4159fd493f5035d081dc4a79a.tar.gz
rust-fe48c3b620fa25d4159fd493f5035d081dc4a79a.zip
rustc: Forbid plugin_registrar in only rlib form
If a plugin registrar is available, the library must be found in dylib form, not
just in rlib form.

Closes #15475
Diffstat (limited to 'src/test/auxiliary')
-rw-r--r--src/test/auxiliary/rlib_crate_test.rs21
1 files changed, 21 insertions, 0 deletions
diff --git a/src/test/auxiliary/rlib_crate_test.rs b/src/test/auxiliary/rlib_crate_test.rs
new file mode 100644
index 00000000000..be03a36393e
--- /dev/null
+++ b/src/test/auxiliary/rlib_crate_test.rs
@@ -0,0 +1,21 @@
+// Copyright 2013-2014 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 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+// no-prefer-dynamic
+
+#![crate_type = "rlib"]
+#![feature(plugin_registrar)]
+
+extern crate rustc;
+
+use rustc::plugin::Registry;
+
+#[plugin_registrar]
+pub fn plugin_registrar(_: &mut Registry) {}