Skip to content

Commit 07b3a8b

Browse files
committed
Adding compile fail test for staged_api feature
Issue #39059 r? @est31
1 parent 717ac96 commit 07b3a8b

File tree

2 files changed

+25
-1
lines changed

2 files changed

+25
-1
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
// Copyright 2016 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+
#![stable(feature = "a", since = "b")]
12+
//~^ ERROR stability attributes may not be used outside of the standard library
13+
mod inner_private_module {
14+
// UnnameableTypeAlias isn't marked as reachable, so no stability annotation is required here
15+
pub type UnnameableTypeAlias = u8;
16+
}
17+
18+
#[stable(feature = "a", since = "b")]
19+
//~^ ERROR stability attributes may not be used outside of the standard library
20+
pub fn f() -> inner_private_module::UnnameableTypeAlias {
21+
0
22+
}
23+
24+
fn main() {}

src/tools/tidy/src/features.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,7 @@ pub fn check(path: &Path, bad: &mut bool) {
167167
// FIXME get this whitelist empty.
168168
let whitelist = vec![
169169
"abi_ptx", "simd", "static_recursion",
170-
"cfg_target_has_atomic", "staged_api",
170+
"cfg_target_has_atomic",
171171
"unboxed_closures", "stmt_expr_attributes",
172172
"cfg_target_thread_local", "unwind_attributes",
173173
"inclusive_range_syntax"

0 commit comments

Comments
 (0)