mirror of
https://github.com/rust-lang/rust.git
synced 2026-05-04 18:40:57 +03:00
add test for const fn
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user