Add test for --extern alloc=librustc.rlib

This commit is contained in:
Eric Huss 2019-10-08 09:45:24 -07:00
parent 41e051dfcc
commit f9e4f0f494
3 changed files with 7 additions and 0 deletions

View File

@ -14,3 +14,6 @@ all:
--extern bar=$(TMPDIR)/libbar.rlib \
--extern bar=$(TMPDIR)/libbar-a.rlib
$(RUSTC) foo.rs --extern bar=$(TMPDIR)/libbar.rlib
# Try to be sneaky and load a private crate from with a non-private name.
$(RUSTC) rustc.rs -Zforce-unstable-if-unmarked --crate-type=rlib
$(RUSTC) gated_unstable.rs --extern alloc=$(TMPDIR)/librustc.rlib 2>&1 | $(CGREP) 'rustc_private'

View File

@ -0,0 +1,3 @@
extern crate alloc;
fn main() {}

View File

@ -0,0 +1 @@
pub fn foo() {}