Skip to content

Commit dfee0da

Browse files
committed
Add test for misspelled feature name
1 parent 97b131c commit dfee0da

File tree

2 files changed

+28
-5
lines changed

2 files changed

+28
-5
lines changed
Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,14 @@
1-
#![feature(unknown_rust_feature)] //~ ERROR unknown feature
1+
#![feature(
2+
unknown_rust_feature,
3+
//~^ ERROR unknown feature
4+
5+
// Typo for lang feature
6+
associated_types_default,
7+
//~^ ERROR unknown feature
8+
9+
// Typo for lib feature
10+
core_intrnisics,
11+
//~^ ERROR unknown feature
12+
)]
213

314
fn main() {}
Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,21 @@
11
error[E0635]: unknown feature `unknown_rust_feature`
2-
--> $DIR/unknown-feature.rs:1:12
2+
--> $DIR/unknown-feature.rs:2:5
33
|
4-
LL | #![feature(unknown_rust_feature)]
5-
| ^^^^^^^^^^^^^^^^^^^^
4+
LL | unknown_rust_feature,
5+
| ^^^^^^^^^^^^^^^^^^^^
66

7-
error: aborting due to 1 previous error
7+
error[E0635]: unknown feature `associated_types_default`
8+
--> $DIR/unknown-feature.rs:6:5
9+
|
10+
LL | associated_types_default,
11+
| ^^^^^^^^^^^^^^^^^^^^^^^^
12+
13+
error[E0635]: unknown feature `core_intrnisics`
14+
--> $DIR/unknown-feature.rs:10:5
15+
|
16+
LL | core_intrnisics,
17+
| ^^^^^^^^^^^^^^^
18+
19+
error: aborting due to 3 previous errors
820

921
For more information about this error, try `rustc --explain E0635`.

0 commit comments

Comments
 (0)