Skip to content

Commit c3ae2f8

Browse files
authored
Rollup merge of rust-lang#40047 - topecongiro:master, r=est31
Add compile fail test for unboxed_closures feature Hello, this is my first contribution to rust. Issue rust-lang#39059.
2 parents 211cf7d + 988be44 commit c3ae2f8

File tree

2 files changed

+26
-2
lines changed

2 files changed

+26
-2
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+
struct Test;
12+
13+
impl FnOnce<(u32, u32)> for Test {
14+
type Output = u32;
15+
16+
extern "rust-call" fn call_once(self, (a, b): (u32, u32)) -> u32 {
17+
a + b
18+
}
19+
//~^^^ ERROR rust-call ABI is subject to change (see issue #29625)
20+
}
21+
22+
fn main() {
23+
assert_eq!(Test(1u32, 2u32), 3u32);
24+
}

src/tools/tidy/src/features.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -169,8 +169,8 @@ pub fn check(path: &Path, bad: &mut bool) {
169169
let whitelist = vec![
170170
"abi_ptx", "simd",
171171
"cfg_target_has_atomic",
172-
"unboxed_closures", "stmt_expr_attributes",
173-
"cfg_target_thread_local", "unwind_attributes"
172+
"stmt_expr_attributes",
173+
"cfg_target_thread_local", "unwind_attributes",
174174
];
175175

176176
// Only check the number of lang features.

0 commit comments

Comments
 (0)