Closed
Description
Uplifted from rust-lang/rust#125831 cuz I consider this pretty important.
MCVE:
//@ compile-flags: -Znext-solver
#![feature(effects, const_trait_impl)]
#![crate_type = "lib"]
// #[const_trait] // <-- intentionally absent
trait NonConstTrait {
fn something();
}
impl NonConstTrait for () {
fn something() {}
}
const fn f() { <()>::something() } // wrongfully accepted!
// should've raised Unimplemented( (): ~const NonConstTrait )
// or at least rejected this call some other way
Metadata
Metadata
Assignees
Labels
No labels