Skip to content

Commit

Permalink
Opt-out autotests for cargo
Browse files Browse the repository at this point in the history
Since we explicit add a test section to specify the `tests.rs` file,
there is no need for auto tests inferece. This commit is to disable the annoying
warning:

warning: An explicit [[test]] section is specified in Cargo.toml which currently
disables Cargo from automatically inferring other test targets.
This inference behavior will change in the Rust 2018 edition and the following
files will be included as a test target:

* util.rs
* macros.rs

This is likely to break cargo build or cargo test as these files may not be
ready to be compiled as a test target today. You can future-proof yourself
and disable this warning by adding `autotests = false` to your [package]
section. You may also move the files to a location where Cargo would not
automatically infer them to be a target, such as in subfolders.

For more information on this warning you can consult
rust-lang/cargo#5330
  • Loading branch information
Mingshen Sun committed Jul 17, 2018
1 parent d11bf9b commit eb89422
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ version = "0.1.0"
authors = ["Alex Lyon <[email protected]>"]
description = "A collection of utilities important to basic system functionality"
build = "build.rs"
autotests = false

[features]
arch = ["platform-info"]
Expand Down

0 comments on commit eb89422

Please sign in to comment.