Skip to content

Commit 8052a4e

Browse files
committed
Add a test for HashStable stability
1 parent 12a491f commit 8052a4e

File tree

2 files changed

+63
-0
lines changed

2 files changed

+63
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
// ignore-stage1
2+
3+
extern crate rustc_data_structures;
4+
//~^ use of unstable library feature 'rustc_private'
5+
extern crate rustc;
6+
//~^ use of unstable library feature 'rustc_private'
7+
extern crate rustc_macros;
8+
//~^ use of unstable library feature 'rustc_private'
9+
10+
use rustc_macros::HashStable;
11+
//~^ use of unstable library feature 'rustc_private'
12+
13+
#[derive(HashStable)]
14+
//~^ use of unstable library feature 'rustc_private'
15+
struct Test;
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
error[E0601]: `main` function not found in crate `hash_stable_is_unstable`
2+
|
3+
= note: consider adding a `main` function to `$DIR/hash-stable-is-unstable.rs`
4+
5+
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? (see issue #27812)
6+
--> $DIR/hash-stable-is-unstable.rs:3:1
7+
|
8+
LL | extern crate rustc_data_structures;
9+
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
10+
|
11+
= help: add #![feature(rustc_private)] to the crate attributes to enable
12+
13+
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? (see issue #27812)
14+
--> $DIR/hash-stable-is-unstable.rs:5:1
15+
|
16+
LL | extern crate rustc;
17+
| ^^^^^^^^^^^^^^^^^^^
18+
|
19+
= help: add #![feature(rustc_private)] to the crate attributes to enable
20+
21+
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? (see issue #27812)
22+
--> $DIR/hash-stable-is-unstable.rs:7:1
23+
|
24+
LL | extern crate rustc_macros;
25+
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
26+
|
27+
= help: add #![feature(rustc_private)] to the crate attributes to enable
28+
29+
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? (see issue #27812)
30+
--> $DIR/hash-stable-is-unstable.rs:10:5
31+
|
32+
LL | use rustc_macros::HashStable;
33+
| ^^^^^^^^^^^^^^^^^^^^^^^^
34+
|
35+
= help: add #![feature(rustc_private)] to the crate attributes to enable
36+
37+
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? (see issue #27812)
38+
--> $DIR/hash-stable-is-unstable.rs:13:10
39+
|
40+
LL | #[derive(HashStable)]
41+
| ^^^^^^^^^^
42+
|
43+
= help: add #![feature(rustc_private)] to the crate attributes to enable
44+
45+
error: aborting due to 6 previous errors
46+
47+
Some errors occurred: E0601, E0658.
48+
For more information about an error, try `rustc --explain E0601`.

0 commit comments

Comments
 (0)