It was accidentally omited when migrating to clap
"Build all targets (default)",
)
.arg_release("Build artifacts in release mode, with optimizations")
+ .arg_features()
.arg_manifest_path()
.arg_message_format()
.after_help(
)),
);
}
+
+#[test]
+fn features() {
+ let p = project("foo")
+ .file(
+ "Cargo.toml",
+ r#"
+ [package]
+ name = "foo"
+ version = "0.0.1"
+ authors = []
+
+ [features]
+ quux = []
+ "#,
+ )
+ .file("src/lib.rs", "")
+ .build();
+
+ assert_that(
+ p.cargo("rustdoc --verbose --features quux"),
+ execs()
+ .with_status(0)
+ .with_stderr_contains("[..]feature=[..]quux[..]"),
+ );
+}