Skip to content

Commit

Permalink
Update tests
Browse files Browse the repository at this point in the history
Add a test for rust-lang#38763.
Update a test for rust-lang#45662.
  • Loading branch information
topecongiro committed Jan 14, 2018
1 parent 73ac5d6 commit f461a59
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/test/run-pass/align-with-extern-c-fn.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ pub struct A {
y: i64,
}

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

fn main() {}
21 changes: 21 additions & 0 deletions src/test/run-pass/issue-38763.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
// Copyright 2018 The Rust Project Developers. See the COPYRIGHT
// file at the top-level directory of this distribution and at
// http://rust-lang.org/COPYRIGHT.
//
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
// option. This file may not be copied, modified, or distributed
// except according to those terms.

#![feature(i128_type)]

#[repr(C)]
pub struct Foo(i128);

#[no_mangle]
pub extern "C" fn foo(x: Foo) -> Foo { x }

fn main() {
foo(Foo(1));
}

0 comments on commit f461a59

Please sign in to comment.