Sign in
fuchsia
/
third_party
/
rust
/
08351004125c4d49aa757f2c3ec2340f7469ea91
/
.
/
src
/
test
/
ui
/
mismatched_types
/
const-fn-in-trait.rs
blob: 7fcbd7e7e8bb24ce4aac78456628dc58e687ad27 [
file
] [
log
] [
blame
]
// rustc-env:RUST_NEW_ERROR_FORMAT
#![
feature
(
const_fn
)]
trait
Foo
{
fn
f
()
->
u32
;
const
fn
g
();
//~ ERROR cannot be declared const
}
impl
Foo
for
u32
{
const
fn
f
()
->
u32
{
22
}
//~ ERROR cannot be declared const
fn
g
()
{}
}
fn
main
()
{
}