Skip to content

Commit 2b0bc6f

Browse files
committed
Add a test that bare functions are word-sized
Issue rust-lang#1022
1 parent 58e67c2 commit 2b0bc6f

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

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

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
use std;
2+
3+
fn main() {
4+
assert std::sys::rustrt::size_of::<fn#()>() ==
5+
std::sys::rustrt::size_of::<int>();
6+
}

0 commit comments

Comments
 (0)