2024-06-30 17:08:45 +00:00
|
|
|
//@ compile-flags: -Znext-solver
|
2024-10-30 18:03:44 +00:00
|
|
|
#![feature(const_trait_impl)]
|
2022-12-04 09:55:43 +09:00
|
|
|
|
|
|
|
|
#[const_trait]
|
|
|
|
|
trait Tr {
|
|
|
|
|
fn req(&self);
|
|
|
|
|
|
|
|
|
|
fn prov(&self) {
|
2024-12-23 21:49:48 +00:00
|
|
|
println!("lul"); //~ ERROR: cannot call non-const function `_print` in constant functions
|
2022-12-04 09:55:43 +09:00
|
|
|
self.req();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
struct S;
|
|
|
|
|
|
|
|
|
|
impl const Tr for S {
|
|
|
|
|
fn req(&self) {}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
fn main() {}
|