Split out termination_trait_test feature gate
This commit is contained in:
parent
c2f4744d2d
commit
c5c650d670
4 changed files with 30 additions and 5 deletions
22
src/test/compile-fail/feature-gate-termination_trait_test.rs
Normal file
22
src/test/compile-fail/feature-gate-termination_trait_test.rs
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
// Copyright 2017 The Rust Project Developers. See the COPYRIGHT
|
||||
// file at the top-level directory of this distribution and at
|
||||
// http://rust-lang.org/COPYRIGHT.
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
|
||||
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
|
||||
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
|
||||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
// compile-flags: --test
|
||||
|
||||
fn main() {}
|
||||
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
#[test]
|
||||
fn it_works() -> Result<(), ()> {
|
||||
//~^ ERROR functions used as tests must have signature fn() -> ()
|
||||
Ok(())
|
||||
}
|
||||
}
|
||||
|
|
@ -10,7 +10,7 @@
|
|||
|
||||
// compile-flags: --test
|
||||
|
||||
#![feature(termination_trait)]
|
||||
#![feature(termination_trait_test)]
|
||||
#![feature(test)]
|
||||
|
||||
extern crate test;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue