Skip to content

Commit 3a5045a

Browse files
committed
Add tests
1 parent 2ff4b81 commit 3a5045a

File tree

3 files changed

+15
-7
lines changed

3 files changed

+15
-7
lines changed

tests/ui/internal/auxiliary/unstable_feature.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
1+
#![allow(internal_features)]
2+
13
#![feature(impl_stability)]
4+
#![feature(trivial_bounds)] // TODO: figure out what is this
5+
26

37
pub trait Foo {
48
fn foo();
@@ -10,3 +14,5 @@ pub struct Bar;
1014
impl Foo for Bar {
1115
fn foo() {}
1216
}
17+
18+
fn main() {}
Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
11
//@ aux-build:unstable_feature.rs
22

3-
//#![feature(impl_stability)]
3+
#![feature(impl_stability)]
4+
#![feature(trivial_bounds)]
45

56
extern crate unstable_feature;
67
use unstable_feature::{Foo, Bar};
78

8-
fn main() {
9-
//#![unstable_feature_bound(feat_foo)]
9+
#[unstable_feature_bound(feat_foo)]
10+
fn main() { //~ ERROR: `main` function is not allowed to have a `where` clause
1011
Bar::foo();
1112
}
Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
1-
error: `unstable_feature_bound` expects a list of feature names
2-
--> $DIR/unstable-feature-bound.rs:14:1
1+
error[E0646]: `main` function is not allowed to have a `where` clause
2+
--> $DIR/unstable-feature-bound.rs:10:10
33
|
4-
LL | #[unstable_feature_bound]
5-
| ^^^^^^^^^^^^^^^^^^^^^^^^^
4+
LL | fn main() {
5+
| ^ `main` cannot have a `where` clause
66

77
error: aborting due to 1 previous error
88

9+
For more information about this error, try `rustc --explain E0646`.

0 commit comments

Comments
 (0)