Skip to content

Commit 32b8f4e

Browse files
authored
Rollup merge of rust-lang#39772 - cseale:staged_api_whitelist_removal, r=est31
Adding compile fail test for staged_api feature Issue rust-lang#39059 r? @est31 @est31 running the tests for this feature fails. Is that expected since this is the `compile-fail`suite? I copied this test from the run-pass suite: `rust/src/test/run-pass/reachable-unnameable-type-alias.rs`. What are the differences between these suites in operation and why they are used?
2 parents c9737af + 07b3a8b commit 32b8f4e

File tree

2 files changed

+25
-1
lines changed

2 files changed

+25
-1
lines changed
Lines changed: 24 additions & 0 deletions
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

Lines changed: 1 addition & 1 deletion
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)