]>
git.proxmox.com Git - rustc.git/blob - src/test/ui/rustc-args-required-const.rs
1 #![feature(rustc_attrs, const_fn)]
3 #[rustc_args_required_const(0)]
7 #[rustc_args_required_const(1)]
8 fn bar(_a
: i32, _b
: i32) {
13 const fn baz() -> i32 {
20 const BAZ
: i32 = baz();
24 foo(a
); //~ ERROR: argument 1 is required to be a constant
26 bar(a
, a
); //~ ERROR: argument 2 is required to be a constant