From: bors Date: Mon, 6 Mar 2017 16:04:27 +0000 (+0000) Subject: Auto merge of #3799 - integer32llc:restore-generated-tests-module, r=alexcrichton X-Git-Tag: archive/raspbian/0.35.0-2+rpi1~3^2^2^2^2^2^2^2~22^2~9^2~115 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=c54a2ade31d80a58266ffa0737a7045bcf72b71d;p=cargo.git Auto merge of #3799 - integer32llc:restore-generated-tests-module, r=alexcrichton Restore the generated tests module created by `cargo new` Appears to have been removed unintentionally in #3004. Was just working on the book, ran `cargo new adder` with cargo-0.18.0-nightly (6f1b860 2017-02-11), and got this in `src/lib.rs`: ```rust #[test] fn it_works() { } ``` when I expected to get this: ```rust #[cfg(test)] mod tests { #[test] fn it_works() { } } ``` It looks like this was changed as part of #3004 ([removed](https://github.com/rust-lang/cargo/commit/875a8aba7916b63c3c8464008a271f6082e23779#diff-149dd4362a3b0dc13b113762713119dfL477), [added](https://github.com/rust-lang/cargo/commit/875a8aba7916b63c3c8464008a271f6082e23779#diff-149dd4362a3b0dc13b113762713119dfR678)), I'm assuming unintentionally? The regression has not yet hit the beta channel; `cargo-0.17.0-nightly (0bb8047 2017-02-06)` generates the src/lib.rs I expect. --- c54a2ade31d80a58266ffa0737a7045bcf72b71d