Skip to content

Commit f461a59

Browse files
committed
Update tests
Add a test for rust-lang#38763. Update a test for rust-lang#45662.
1 parent 73ac5d6 commit f461a59

File tree

2 files changed

+22
-0
lines changed

2 files changed

+22
-0
lines changed

src/test/run-pass/align-with-extern-c-fn.rs

+1
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ pub struct A {
1818
y: i64,
1919
}
2020

21+
#[no_mangle]
2122
pub extern "C" fn foo(x: A) {}
2223

2324
fn main() {}

src/test/run-pass/issue-38763.rs

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
// Copyright 2018 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+
#![feature(i128_type)]
12+
13+
#[repr(C)]
14+
pub struct Foo(i128);
15+
16+
#[no_mangle]
17+
pub extern "C" fn foo(x: Foo) -> Foo { x }
18+
19+
fn main() {
20+
foo(Foo(1));
21+
}

0 commit comments

Comments
 (0)