Add compile-fail test for the new feature gate
This commit is contained in:
parent
8e5a3023c9
commit
8edc3cae3b
17
src/test/compile-fail/feature-gate-allow_fail.rs
Normal file
17
src/test/compile-fail/feature-gate-allow_fail.rs
Normal file
@ -0,0 +1,17 @@
|
||||
// Copyright 2015 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.
|
||||
|
||||
// check that #[allow_fail] is feature-gated
|
||||
|
||||
#[allow_fail] //~ ERROR allow_fail attribute is currently unstable
|
||||
fn ok_to_fail() {
|
||||
assert!(false);
|
||||
}
|
||||
|
@ -9,6 +9,7 @@
|
||||
// except according to those terms.
|
||||
|
||||
// compile-flags: --test
|
||||
#![feature(allow_fail)]
|
||||
|
||||
#[test]
|
||||
#[allow_fail]
|
||||
|
Loading…
x
Reference in New Issue
Block a user