Skip to content

Commit a618217

Browse files
committed
Fix some tests
1 parent 33107d1 commit a618217

File tree

3 files changed

+21
-4
lines changed

3 files changed

+21
-4
lines changed

tests/ui/internal/auxiliary/unstable_feature.rs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,9 @@
44
#![allow(dead_code)]
55
#![unstable(feature = "feat_foo", issue = "none" )]
66

7-
#[stable(feature = "a", since = "1.1.1" )]
87
pub trait Foo {
9-
#[stable(feature = "a", since = "1.1.1" )]
108
fn foo();
119
}
12-
#[stable(feature = "a", since = "1.1.1" )]
1310
pub struct Bar;
1411

1512
// Annotate the impl as unstable.

tests/ui/internal/unstable-feature-bound.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,6 @@ use unstable_feature::{Foo, Bar}; //~ ERROR: use of unstable library feature `fe
77

88
fn main() {
99
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`
1012
}

tests/ui/internal/unstable-feature-bound.stderr

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,24 @@ LL | use unstable_feature::{Foo, Bar};
3535
= note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
3636
= note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
3737

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+
3856
error[E0284]: type annotations needed: cannot satisfy `unstable feature: `feat_foo``
3957
--> $DIR/unstable-feature-bound.rs:9:5
4058
|
@@ -43,7 +61,7 @@ LL | Bar::foo();
4361
|
4462
= note: required for `Bar` to implement `Foo`
4563

46-
error: aborting due to 5 previous errors
64+
error: aborting due to 7 previous errors
4765

4866
Some errors have detailed explanations: E0284, E0658.
4967
For more information about an error, try `rustc --explain E0284`.

0 commit comments

Comments
 (0)