We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 46f6b05 + 7dd5e3c commit ddda3faCopy full SHA for ddda3fa
tests/ui/imports/resolve-other-libc.rs
@@ -0,0 +1,14 @@
1
+// Regression test for https://github.com/rust-lang/rust/issues/26043
2
+
3
+// compile-flags: --extern libc=test.rlib
4
5
+// The error shall NOT be something similar to the following, because it
6
+// indicates that `libc` was wrongly resolved to `libc` shipped with the
7
+// compiler:
8
+//
9
+// error[E0658]: use of unstable library feature 'rustc_private': \
10
+// this crate is being loaded from the sysroot
11
12
+extern crate libc; //~ ERROR: extern location for libc does not exist: test.rlib
13
14
+fn main() {}
tests/ui/imports/resolve-other-libc.stderr
@@ -0,0 +1,8 @@
+error: extern location for libc does not exist: test.rlib
+ --> $DIR/resolve-other-libc.rs:12:1
+ |
+LL | extern crate libc;
+ | ^^^^^^^^^^^^^^^^^^
+error: aborting due to previous error
0 commit comments