Skip to content

Commit 108628e

Browse files
committed
Make the type and trait stable
1 parent a618217 commit 108628e

File tree

3 files changed

+10
-66
lines changed

3 files changed

+10
-66
lines changed

tests/ui/internal/auxiliary/unstable_feature.rs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,19 @@
22
#![feature(staged_api)] // Enabled to use #![unstable(feature = "feat_foo", issue = "none")]
33
#![feature(impl_stability)] // Enabled to use #[unstable_feature_bound(feat_foo)]
44
#![allow(dead_code)]
5-
#![unstable(feature = "feat_foo", issue = "none" )]
5+
#![stable(feature = "a", since = "1.1.1" )]
66

7+
#[stable(feature = "a", since = "1.1.1" )]
78
pub trait Foo {
9+
#[stable(feature = "a", since = "1.1.1" )]
810
fn foo();
911
}
12+
#[stable(feature = "a", since = "1.1.1" )]
1013
pub struct Bar;
1114

1215
// Annotate the impl as unstable.
1316
#[unstable_feature_bound(feat_foo)]
17+
#[unstable(feature = "feat_foo", issue = "none" )]
1418
impl Foo for Bar {
1519
fn foo() {}
1620
}
Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,8 @@
11
//@ aux-build:unstable_feature.rs
22

3-
extern crate unstable_feature; //~ ERROR: use of unstable library feature `feat_foo`
4-
use unstable_feature::{Foo, Bar}; //~ ERROR: use of unstable library feature `feat_foo`
5-
//~^ ERROR: use of unstable library feature `feat_foo`
6-
//~^^ ERROR: use of unstable library feature `feat_foo`
3+
extern crate unstable_feature;
4+
use unstable_feature::{Foo, Bar};
75

86
fn main() {
97
Bar::foo(); //~ ERROR: type annotations needed: cannot satisfy `unstable feature: `feat_foo``
10-
//~^ ERROR: use of unstable library feature `feat_foo`
11-
//~^^ ERROR: use of unstable library feature `feat_foo`
128
}
Lines changed: 3 additions & 59 deletions
Original file line numberDiff line numberDiff line change
@@ -1,67 +1,11 @@
1-
error[E0658]: use of unstable library feature `feat_foo`
2-
--> $DIR/unstable-feature-bound.rs:3:1
3-
|
4-
LL | extern crate unstable_feature;
5-
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
6-
|
7-
= help: add `#![feature(feat_foo)]` to the crate attributes to enable
8-
= note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
9-
10-
error[E0658]: use of unstable library feature `feat_foo`
11-
--> $DIR/unstable-feature-bound.rs:4:24
12-
|
13-
LL | use unstable_feature::{Foo, Bar};
14-
| ^^^
15-
|
16-
= help: add `#![feature(feat_foo)]` to the crate attributes to enable
17-
= note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
18-
19-
error[E0658]: use of unstable library feature `feat_foo`
20-
--> $DIR/unstable-feature-bound.rs:4:29
21-
|
22-
LL | use unstable_feature::{Foo, Bar};
23-
| ^^^
24-
|
25-
= help: add `#![feature(feat_foo)]` to the crate attributes to enable
26-
= note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
27-
28-
error[E0658]: use of unstable library feature `feat_foo`
29-
--> $DIR/unstable-feature-bound.rs:4:29
30-
|
31-
LL | use unstable_feature::{Foo, Bar};
32-
| ^^^
33-
|
34-
= help: add `#![feature(feat_foo)]` to the crate attributes to enable
35-
= note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
36-
= note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
37-
38-
error[E0658]: use of unstable library feature `feat_foo`
39-
--> $DIR/unstable-feature-bound.rs:9:5
40-
|
41-
LL | Bar::foo();
42-
| ^^^
43-
|
44-
= help: add `#![feature(feat_foo)]` to the crate attributes to enable
45-
= note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
46-
47-
error[E0658]: use of unstable library feature `feat_foo`
48-
--> $DIR/unstable-feature-bound.rs:9:5
49-
|
50-
LL | Bar::foo();
51-
| ^^^^^^^^
52-
|
53-
= help: add `#![feature(feat_foo)]` to the crate attributes to enable
54-
= note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
55-
561
error[E0284]: type annotations needed: cannot satisfy `unstable feature: `feat_foo``
57-
--> $DIR/unstable-feature-bound.rs:9:5
2+
--> $DIR/unstable-feature-bound.rs:7:5
583
|
594
LL | Bar::foo();
605
| ^^^ cannot satisfy `unstable feature: `feat_foo``
616
|
627
= note: required for `Bar` to implement `Foo`
638

64-
error: aborting due to 7 previous errors
9+
error: aborting due to 1 previous error
6510

66-
Some errors have detailed explanations: E0284, E0658.
67-
For more information about an error, try `rustc --explain E0284`.
11+
For more information about this error, try `rustc --explain E0284`.

0 commit comments

Comments
 (0)