diff options
| author | John Kåre Alsaker <john.kare.alsaker@gmail.com> | 2019-03-05 19:28:20 +0100 |
|---|---|---|
| committer | John Kåre Alsaker <john.kare.alsaker@gmail.com> | 2019-03-05 20:46:45 +0100 |
| commit | 8052a4e5ac2c0bd6cf305cd463e105dc462d4792 (patch) | |
| tree | c187e049d9cdae6f9ec74c41dc866c3826d18bc8 /src | |
| parent | 12a491fbe27eaed8200190aae017759e80cabad5 (diff) | |
| download | rust-8052a4e5ac2c0bd6cf305cd463e105dc462d4792.tar.gz rust-8052a4e5ac2c0bd6cf305cd463e105dc462d4792.zip | |
Add a test for HashStable stability
Diffstat (limited to 'src')
| -rw-r--r-- | src/test/ui-fulldeps/hash-stable-is-unstable.rs | 15 | ||||
| -rw-r--r-- | src/test/ui-fulldeps/hash-stable-is-unstable.stderr | 48 |
2 files changed, 63 insertions, 0 deletions
diff --git a/src/test/ui-fulldeps/hash-stable-is-unstable.rs b/src/test/ui-fulldeps/hash-stable-is-unstable.rs new file mode 100644 index 00000000000..9f67f642df1 --- /dev/null +++ b/src/test/ui-fulldeps/hash-stable-is-unstable.rs @@ -0,0 +1,15 @@ +// ignore-stage1 + +extern crate rustc_data_structures; +//~^ use of unstable library feature 'rustc_private' +extern crate rustc; +//~^ use of unstable library feature 'rustc_private' +extern crate rustc_macros; +//~^ use of unstable library feature 'rustc_private' + +use rustc_macros::HashStable; +//~^ use of unstable library feature 'rustc_private' + +#[derive(HashStable)] +//~^ use of unstable library feature 'rustc_private' +struct Test; diff --git a/src/test/ui-fulldeps/hash-stable-is-unstable.stderr b/src/test/ui-fulldeps/hash-stable-is-unstable.stderr new file mode 100644 index 00000000000..e7007204d38 --- /dev/null +++ b/src/test/ui-fulldeps/hash-stable-is-unstable.stderr @@ -0,0 +1,48 @@ +error[E0601]: `main` function not found in crate `hash_stable_is_unstable` + | + = note: consider adding a `main` function to `$DIR/hash-stable-is-unstable.rs` + +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) + --> $DIR/hash-stable-is-unstable.rs:3:1 + | +LL | extern crate rustc_data_structures; + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + | + = help: add #![feature(rustc_private)] to the crate attributes to enable + +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) + --> $DIR/hash-stable-is-unstable.rs:5:1 + | +LL | extern crate rustc; + | ^^^^^^^^^^^^^^^^^^^ + | + = help: add #![feature(rustc_private)] to the crate attributes to enable + +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) + --> $DIR/hash-stable-is-unstable.rs:7:1 + | +LL | extern crate rustc_macros; + | ^^^^^^^^^^^^^^^^^^^^^^^^^^ + | + = help: add #![feature(rustc_private)] to the crate attributes to enable + +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) + --> $DIR/hash-stable-is-unstable.rs:10:5 + | +LL | use rustc_macros::HashStable; + | ^^^^^^^^^^^^^^^^^^^^^^^^ + | + = help: add #![feature(rustc_private)] to the crate attributes to enable + +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) + --> $DIR/hash-stable-is-unstable.rs:13:10 + | +LL | #[derive(HashStable)] + | ^^^^^^^^^^ + | + = help: add #![feature(rustc_private)] to the crate attributes to enable + +error: aborting due to 6 previous errors + +Some errors occurred: E0601, E0658. +For more information about an error, try `rustc --explain E0601`. |
