From 673b8d5f22f762b4e014dc754eb624fc04876207 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ga=C3=ABtan=20Cassiers?= Date: Mon, 25 May 2015 13:25:06 +0200 Subject: [PATCH] add test for const fn --- tests/idem/fn.rs | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/tests/idem/fn.rs b/tests/idem/fn.rs index bbb9fa173d22..b78f6d9ffc33 100644 --- a/tests/idem/fn.rs +++ b/tests/idem/fn.rs @@ -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;