Closed
Description
Doesn't work:
#![feature(const_fn)]
fn main(){}
const fn size_ofs(_: usize) { }
<anon>:3:19: 3:20 error: arguments of constant functions can only be immutable by-value bindings [E0022]
<anon>:3 const fn size_ofs(_: usize) { }
^
<anon>:3:19: 3:20 help: see the detailed explanation for E0022
error: aborting due to previous error
playpen: application terminated with error code 101
Works:
#![feature(const_fn)]
fn main(){}
const fn size_ofs(_foo: usize) { }
<anon>:3:1: 3:35 warning: function is never used: `size_ofs`, #[warn(dead_code)] on by default
<anon>:3 const fn size_ofs(_foo: usize) { }
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~