Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#![allow(internal_features)]
#![feature(staged_api)]
#![unstable(feature = "foo", issue = "none" )]

#[unstable_feature_bound(foo)]
#[unstable(feature = "foo", issue = "none" )]
pub trait Foo {
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
//@ aux-build:unstable_feature_bound_on_trait.rs

extern crate unstable_feature_bound_on_trait as aux;
//~^ ERROR: use of unstable library feature `foo`
use aux::Foo;
//~^ ERROR: use of unstable library feature `foo`

struct Bar{}

impl Foo for Bar {
//~^ ERROR: use of unstable library feature `foo`
//~^^ ERROR: use of unstable library feature `foo`
}

fn main() {
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
error[E0658]: use of unstable library feature `foo`
--> $DIR/unstable_feature_bound_on_trait_error_message.rs:3:1
|
LL | extern crate unstable_feature_bound_on_trait as aux;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: add `#![feature(foo)]` to the crate attributes to enable
= note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date

error[E0658]: use of unstable library feature `foo`
--> $DIR/unstable_feature_bound_on_trait_error_message.rs:5:5
|
LL | use aux::Foo;
| ^^^^^^^^
|
= help: add `#![feature(foo)]` to the crate attributes to enable
= note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date

error[E0658]: use of unstable library feature `foo`
--> $DIR/unstable_feature_bound_on_trait_error_message.rs:10:6
|
LL | impl Foo for Bar {
| ^^^
|
= help: add `#![feature(foo)]` to the crate attributes to enable
= note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date

error[E0658]: use of unstable library feature `foo`
--> $DIR/unstable_feature_bound_on_trait_error_message.rs:10:6
|
LL | impl Foo for Bar {
| ^^^
|
= help: add `#![feature(foo)]` to the crate attributes to enable
= note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
note: required by a bound in `Foo`
--> $DIR/auxiliary/unstable_feature_bound_on_trait.rs:5:1
|
LL | #[unstable_feature_bound(foo)]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `Foo`
LL | #[unstable(feature = "foo", issue = "none" )]
LL | pub trait Foo {
| --- required by a bound in this trait

error: aborting due to 4 previous errors

For more information about this error, try `rustc --explain E0658`.
Loading