Sign in
◑
Theme
rust
/
rust
/
ea997df88e4e1b04a0f7dfdabda67e2a5ba4af6f
/
.
/
tests
/
ui
/
comptime
/
comptime_method.rs
blob: e5bd403d6168e4f0b2e8f9c0db4734e12030db2a [
file
]
#![
feature
(
rustc_attrs
)]
struct
Bar
;
#[
rustc_comptime
]
impl
Bar
{
fn
boo
(&
self
)
{}
}
const
_
:
()
=
{
Bar
.
boo
();
};
fn
main
()
{
Bar
.
boo
();
//~^ ERROR: comptime functions can only be called at compile time
}