}
match name {
+ "doc" => {
+ warnings.push("profile `doc` is deprecated and has no effect".to_string());
+ }
"test" | "bench" => {
if self.panic.is_some() {
warnings.push(format!("`panic` setting is ignored for `{}` profile", name))
overridden. This is done so the top-level project has control over how its
dependencies are compiled.
-There are five currently supported profile names, all of which have the same
+There are four currently supported profile names, all of which have the same
configuration available to them. Listed below is the configuration available,
along with the defaults for each profile.
panic = 'unwind'
incremental = false
overflow-checks = false
-
-# The documentation profile, used for `cargo doc`.
-[profile.doc]
-opt-level = 0
-debug = 2
-rpath = false
-lto = false
-debug-assertions = true
-codegen-units = 16
-panic = 'unwind'
-incremental = true
-overflow-checks = true
```
### The `[features]` section
),
);
}
+
+#[test]
+fn profile_doc_deprecated() {
+ let p = project("foo")
+ .file(
+ "Cargo.toml",
+ r#"
+ [package]
+ name = "foo"
+ version = "0.0.1"
+
+ [profile.doc]
+ opt-level = 0
+ "#,
+ )
+ .file("src/lib.rs", "")
+ .build();
+
+ assert_that(
+ p.cargo("build"),
+ execs()
+ .with_status(0)
+ .with_stderr_contains("[WARNING] profile `doc` is deprecated and has no effect"),
+ );
+}