Skip to content

Commit 8edc3ca

Browse files
author
Paul Woolcock
committed
Add compile-fail test for the new feature gate
1 parent 8e5a302 commit 8edc3ca

File tree

2 files changed

+18
-0
lines changed

2 files changed

+18
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
// Copyright 2015 The Rust Project Developers. See the COPYRIGHT
2+
// file at the top-level directory of this distribution and at
3+
// http://rust-lang.org/COPYRIGHT.
4+
//
5+
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
6+
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
7+
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
8+
// option. This file may not be copied, modified, or distributed
9+
// except according to those terms.
10+
11+
// check that #[allow_fail] is feature-gated
12+
13+
#[allow_fail] //~ ERROR allow_fail attribute is currently unstable
14+
fn ok_to_fail() {
15+
assert!(false);
16+
}
17+

src/test/run-pass/test-allow-fail-attr.rs

+1
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
// except according to those terms.
1010

1111
// compile-flags: --test
12+
#![feature(allow_fail)]
1213

1314
#[test]
1415
#[allow_fail]

0 commit comments

Comments
 (0)