Sign in
android
/
toolchain
/
rustc
/
refs/heads/main
/
.
/
tests
/
ui
/
rfcs
/
rfc-2632-const-trait-impl
/
const-check-fns-in-const-impl.rs
blob: a1710e6525292de5dd8f18a93cb69ab676ac450a [
file
] [
log
] [
blame
] [
edit
]
#![
feature
(
const_trait_impl
,
effects
)]
//~ WARN the feature `effects` is incomplete
struct
S
;
#[
const_trait
]
trait
T
{
fn
foo
();
}
fn
non_const
()
{}
impl
const
T
for
S
{
fn
foo
()
{
non_const
()
}
//~^ ERROR cannot call non-const fn
}
fn
main
()
{}