add test for const fn

This commit is contained in:
Gaëtan Cassiers 2015-05-25 13:25:06 +02:00
parent 113bdaa119
commit 673b8d5f22

View File

@ -58,6 +58,20 @@ pub fn render<'a,
render_opts(g, w, &[])
}
const fn foo() {
x;
}
pub const fn foo() {
x;
}
impl Foo {
const fn foo() {
x;
}
}
fn main() {
let _ = function(move || 5);
let _ = move || 42;