Skip to content

Commit b04f842

Browse files
committed
Add a test that bare functions are word-sized
Issue #1022
1 parent 90c2402 commit b04f842

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

src/test/run-pass/fn-bare-size.rs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
// xfail-test
2+
3+
use std;
4+
5+
fn main() {
6+
// Bare functions should just be a pointer
7+
assert std::sys::rustrt::size_of::<fn#()>() ==
8+
std::sys::rustrt::size_of::<int>();
9+
}

0 commit comments

Comments
 (0)