Skip to content

Commit 5e678cf

Browse files
committed
Add test for --extern alloc=librustc.rlib
1 parent 6d47766 commit 5e678cf

File tree

3 files changed

+7
-0
lines changed

3 files changed

+7
-0
lines changed

src/test/run-make-fulldeps/extern-flag-fun/Makefile

+3
Original file line numberDiff line numberDiff line change
@@ -14,3 +14,6 @@ all:
1414
--extern bar=$(TMPDIR)/libbar.rlib \
1515
--extern bar=$(TMPDIR)/libbar-a.rlib
1616
$(RUSTC) foo.rs --extern bar=$(TMPDIR)/libbar.rlib
17+
# Try to be sneaky and load a private crate from with a non-private name.
18+
$(RUSTC) rustc.rs -Zforce-unstable-if-unmarked --crate-type=rlib
19+
$(RUSTC) gated_unstable.rs --extern alloc=$(TMPDIR)/librustc.rlib 2>&1 | $(CGREP) 'rustc_private'
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
extern crate alloc;
2+
3+
fn main() {}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
pub fn foo() {}

0 commit comments

Comments
 (0)