File tree 4 files changed +29
-15
lines changed
4 files changed +29
-15
lines changed Original file line number Diff line number Diff line change @@ -416,6 +416,9 @@ impl TomlProfile {
416
416
}
417
417
418
418
match name {
419
+ "doc" => {
420
+ warnings. push ( "profile `doc` is deprecated and has no effect" . to_string ( ) ) ;
421
+ }
419
422
"test" | "bench" => {
420
423
if self . panic . is_some ( ) {
421
424
warnings. push ( format ! ( "`panic` setting is ignored for `{}` profile" , name) )
Original file line number Diff line number Diff line change @@ -294,7 +294,7 @@ project’s profiles are actually read. All dependencies’ profiles will be
294
294
overridden. This is done so the top-level project has control over how its
295
295
dependencies are compiled.
296
296
297
- There are five currently supported profile names, all of which have the same
297
+ There are four currently supported profile names, all of which have the same
298
298
configuration available to them. Listed below is the configuration available,
299
299
along with the defaults for each profile.
300
300
@@ -357,18 +357,6 @@ codegen-units = 16
357
357
panic = ' unwind'
358
358
incremental = false
359
359
overflow-checks = false
360
-
361
- # The documentation profile, used for `cargo doc`.
362
- [profile .doc ]
363
- opt-level = 0
364
- debug = 2
365
- rpath = false
366
- lto = false
367
- debug-assertions = true
368
- codegen-units = 16
369
- panic = ' unwind'
370
- incremental = true
371
- overflow-checks = true
372
360
```
373
361
374
362
### The ` [features] ` section
Original file line number Diff line number Diff line change @@ -32,8 +32,6 @@ fn all_target_project() -> Project {
32
32
codegen-units = 3
33
33
[profile.bench]
34
34
codegen-units = 4
35
- [profile.doc]
36
- codegen-units = 5
37
35
"# ,
38
36
)
39
37
. file ( "src/lib.rs" , "extern crate bar;" )
Original file line number Diff line number Diff line change @@ -371,3 +371,28 @@ fn profile_panic_test_bench() {
371
371
) ,
372
372
) ;
373
373
}
374
+
375
+ #[ test]
376
+ fn profile_doc_deprecated ( ) {
377
+ let p = project ( "foo" )
378
+ . file (
379
+ "Cargo.toml" ,
380
+ r#"
381
+ [package]
382
+ name = "foo"
383
+ version = "0.0.1"
384
+
385
+ [profile.doc]
386
+ opt-level = 0
387
+ "# ,
388
+ )
389
+ . file ( "src/lib.rs" , "" )
390
+ . build ( ) ;
391
+
392
+ assert_that (
393
+ p. cargo ( "build" ) ,
394
+ execs ( )
395
+ . with_status ( 0 )
396
+ . with_stderr_contains ( "[WARNING] profile `doc` is deprecated and has no effect" ) ,
397
+ ) ;
398
+ }
You can’t perform that action at this time.
0 commit comments