Add test for misspelled feature name

This commit is contained in:
Sasha Pourcelot
2025-12-05 18:06:42 +00:00
parent 97b131c900
commit dfee0dad26
2 changed files with 28 additions and 5 deletions
+12 -1
View File
@@ -1,3 +1,14 @@
#![feature(unknown_rust_feature)] //~ ERROR unknown feature
#![feature(
unknown_rust_feature,
//~^ ERROR unknown feature
// Typo for lang feature
associated_types_default,
//~^ ERROR unknown feature
// Typo for lib feature
core_intrnisics,
//~^ ERROR unknown feature
)]
fn main() {}
+16 -4
View File
@@ -1,9 +1,21 @@
error[E0635]: unknown feature `unknown_rust_feature`
--> $DIR/unknown-feature.rs:1:12
--> $DIR/unknown-feature.rs:2:5
|
LL | #![feature(unknown_rust_feature)]
| ^^^^^^^^^^^^^^^^^^^^
LL | unknown_rust_feature,
| ^^^^^^^^^^^^^^^^^^^^
error: aborting due to 1 previous error
error[E0635]: unknown feature `associated_types_default`
--> $DIR/unknown-feature.rs:6:5
|
LL | associated_types_default,
| ^^^^^^^^^^^^^^^^^^^^^^^^
error[E0635]: unknown feature `core_intrnisics`
--> $DIR/unknown-feature.rs:10:5
|
LL | core_intrnisics,
| ^^^^^^^^^^^^^^^
error: aborting due to 3 previous errors
For more information about this error, try `rustc --explain E0635`.