Skip to content

Commit 91f0d58

Browse files
gnzlbgcrlf0710
authored andcommitted
Add new tests.
1 parent f3a3141 commit 91f0d58

File tree

5 files changed

+45
-1
lines changed

5 files changed

+45
-1
lines changed
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
fn main() {
2+
extern crate libc; //~ ERROR use of unstable
3+
use libc::*; //~ ERROR unresolved import
4+
}
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
error[E0432]: unresolved import `libc`
2+
--> $DIR/feature-gate-rustc_private-libc.rs:3:9
3+
|
4+
LL | use libc::*;
5+
| ^^^^ maybe a missing `extern crate libc;`?
6+
7+
error[E0658]: use of unstable library feature 'rustc_private': crate "libc" is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via `Cargo.toml` instead? (see issue #27812)
8+
--> $DIR/feature-gate-rustc_private-libc.rs:2:5
9+
|
10+
LL | extern crate libc;
11+
| ^^^^^^^^^^^^^^^^^^
12+
|
13+
= help: add #![feature(rustc_private)] to the crate attributes to enable
14+
15+
error: aborting due to 2 previous errors
16+
17+
Some errors occurred: E0432, E0658.
18+
For more information about an error, try `rustc --explain E0432`.
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
fn main() {
2+
extern crate test; //~ ERROR use of unstable
3+
use test::*; //~ ERROR unresolved import
4+
}
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
error[E0432]: unresolved import `test`
2+
--> $DIR/feature-gate-test.rs:3:9
3+
|
4+
LL | use test::*;
5+
| ^^^^ maybe a missing `extern crate test;`?
6+
7+
error[E0658]: use of unstable library feature 'test' (see issue #27812)
8+
--> $DIR/feature-gate-test.rs:2:5
9+
|
10+
LL | extern crate test;
11+
| ^^^^^^^^^^^^^^^^^^
12+
|
13+
= help: add #![feature(test)] to the crate attributes to enable
14+
15+
error: aborting due to 2 previous errors
16+
17+
Some errors occurred: E0432, E0658.
18+
For more information about an error, try `rustc --explain E0432`.

src/test/ui/issues/issue-37887.stderr

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ error[E0432]: unresolved import `libc`
44
LL | use libc::*;
55
| ^^^^ maybe a missing `extern crate libc;`?
66

7-
error[E0658]: use of unstable library feature 'rustc_private': this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via `Cargo.toml` instead?
7+
error[E0658]: use of unstable library feature 'rustc_private': crate "libc" is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via `Cargo.toml` instead? (see issue #27812)
88
--> $DIR/issue-37887.rs:2:5
99
|
1010
LL | extern crate libc;

0 commit comments

Comments
 (0)