-
Notifications
You must be signed in to change notification settings - Fork 13.9k
Closed
Labels
T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.T-langRelevant to the language teamRelevant to the language team
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);
}Metadata
Metadata
Assignees
Labels
T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.T-langRelevant to the language teamRelevant to the language team