Skip to content

Commit

Permalink
add a test for rust-lang#29928
Browse files Browse the repository at this point in the history
  • Loading branch information
oli-obk committed May 11, 2016
1 parent 094d95b commit 6ac3812
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/test/run-pass/const-fn.rs
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,13 @@ const X: () = test();

const fn f(_: ()) -> usize { 1 }

const fn g(x: usize) -> A {
A { field: x }
}
struct A {
field: usize,
}

const SUM: u32 = add(44, 22);
const DIFF: u32 = sub(44, 22);
const DIV: u32 = unsafe{div(44, 22)};
Expand Down

0 comments on commit 6ac3812

Please sign in to comment.