We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent dd3f434 commit d618164Copy full SHA for d618164
tests/testsuite/features.rs
@@ -35,6 +35,37 @@ Caused by:
35
.run();
36
}
37
38
+#[cargo_test]
39
+fn empty_feature_name() {
40
+ let p = project()
41
+ .file(
42
+ "Cargo.toml",
43
+ r#"
44
+ [package]
45
+ name = "foo"
46
+ version = "0.0.1"
47
+ authors = []
48
+
49
+ [features]
50
+ "" = []
51
+ "#,
52
+ )
53
+ .file("src/main.rs", "")
54
+ .build();
55
56
+ p.cargo("check")
57
+ .with_status(101)
58
+ .with_stderr(
59
+ "\
60
+[ERROR] failed to parse manifest at `[..]`
61
62
+Caused by:
63
+ feature name cannot be empty
64
+",
65
66
+ .run();
67
+}
68
69
#[cargo_test]
70
fn same_name() {
71
// Feature with the same name as a dependency.
0 commit comments