Function must_const_expr

Source
pub fn must_const_expr()
Expand description

§必须是常量表达式才能在常量上下文使用

fn main(){
    let an = (42,).0;
    const AN: i32 = an; // Error: attempt to use a non-constant value in a constant
}