error[E0080]: evaluation of constant value failed --> $SRC_DIR/core/src/ops/function.rs:LL:COL | = note: calling non-const function `<() as Tr>::a` | note: inside ` i32 {<() as Tr>::a} as FnOnce<((),)>>::call_once - shim(fn(()) -> i32 {<() as Tr>::a})` --> $SRC_DIR/core/src/ops/function.rs:LL:COL note: inside `need_const_closure:: i32 {<() as Tr>::a}>` --> $DIR/const-closure-trait-method-fail.rs:15:5 | LL | x(()) | ^^^^^ note: inside `_` --> $DIR/const-closure-trait-method-fail.rs:18:23 | LL | const _: () = assert!(need_const_closure(Tr::a) == 42); | ^^^^^^^^^^^^^^^^^^^^^^^^^ error: aborting due to previous error For more information about this error, try `rustc --explain E0080`.