Skip to content

Commit

Permalink
Auto merge of #7198 - petrochenkov:bench, r=alexcrichton
Browse files Browse the repository at this point in the history
tests: Enable features to fix unstabilized `#[bench]`

Needed for rust-lang/rust#62507.

(Even if unstabilization of `bench` is reverted later due to fallout, this change should be ok.)
  • Loading branch information
bors committed Jul 31, 2019
2 parents bf8d6b0 + 01aae39 commit 26092da
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions tests/testsuite/bench.rs
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ fn bench_bench_implicit() {
.file(
"src/main.rs",
r#"
#![cfg_attr(test, feature(test))]
#![feature(test)]
#[cfg(test)]
extern crate test;
#[bench] fn run1(_ben: &mut test::Bencher) { }
Expand Down Expand Up @@ -364,7 +364,7 @@ fn bench_with_lib_dep() {
.file(
"src/lib.rs",
r#"
#![cfg_attr(test, feature(test))]
#![feature(test)]
#[cfg(test)]
extern crate test;
///
Expand Down Expand Up @@ -432,7 +432,7 @@ fn bench_with_deep_lib_dep() {
.file(
"src/lib.rs",
"
#![cfg_attr(test, feature(test))]
#![feature(test)]
#[cfg(test)]
extern crate foo;
#[cfg(test)]
Expand All @@ -448,7 +448,7 @@ fn bench_with_deep_lib_dep() {
.file(
"src/lib.rs",
"
#![cfg_attr(test, feature(test))]
#![feature(test)]
#[cfg(test)]
extern crate test;
Expand Down Expand Up @@ -495,7 +495,7 @@ fn external_bench_explicit() {
.file(
"src/lib.rs",
r#"
#![cfg_attr(test, feature(test))]
#![feature(test)]
#[cfg(test)]
extern crate test;
pub fn get_hello() -> &'static str { "Hello" }
Expand Down Expand Up @@ -541,7 +541,7 @@ fn external_bench_implicit() {
.file(
"src/lib.rs",
r#"
#![cfg_attr(test, feature(test))]
#![feature(test)]
#[cfg(test)]
extern crate test;
Expand Down Expand Up @@ -760,7 +760,7 @@ fn lib_bin_same_name() {
.file(
"src/lib.rs",
"
#![cfg_attr(test, feature(test))]
#![feature(test)]
#[cfg(test)]
extern crate test;
#[bench] fn lib_bench(_b: &mut test::Bencher) {}
Expand All @@ -769,7 +769,7 @@ fn lib_bin_same_name() {
.file(
"src/main.rs",
"
#![cfg_attr(test, feature(test))]
#![feature(test)]
#[allow(unused_extern_crates)]
extern crate foo;
#[cfg(test)]
Expand Down Expand Up @@ -804,7 +804,7 @@ fn lib_with_standard_name() {
.file(
"src/lib.rs",
"
#![cfg_attr(test, feature(test))]
#![feature(test)]
#[cfg(test)]
extern crate test;
Expand Down Expand Up @@ -919,7 +919,7 @@ fn bench_dylib() {
.file(
"src/lib.rs",
r#"
#![cfg_attr(test, feature(test))]
#![feature(test)]
extern crate bar as the_bar;
#[cfg(test)]
extern crate test;
Expand Down Expand Up @@ -1061,7 +1061,7 @@ fn bench_with_examples() {
.file(
"src/lib.rs",
r#"
#![cfg_attr(test, feature(test))]
#![feature(test)]
#[cfg(test)]
extern crate test;
#[cfg(test)]
Expand Down

0 comments on commit 26092da

Please sign in to comment.