Closed
Description
calling a rustc_args_required_const
-marked function from a rustc_args_required_const
-marked function does not work as intended.
#![feature(rustc_attrs)]
trait T {
#[rustc_args_required_const(1)]
fn t(self, b: i32);
}
#[inline]
#[rustc_args_required_const(1)]
const fn ex_t(a: u8, b: i32) {
let _ = a as i32 + b;
}
#[inline]
#[rustc_args_required_const(1)]
fn ex_t2(a: u8, b: i32) {
ex_t(a, b);
}
impl T for u8 {
#[rustc_args_required_const(1)]
fn t(self, b: i32) {
// println!("{}", b);
ex_t(self, b);
}
}
fn main() {
let a = 42u8;
a.t(42);
}