Sign in
◑
Theme
rust
/
rust
/
d7e8f9fc7af4aa4cd65140afaebe48dd1e90e708
/
.
/
tests
/
ui
/
traits
/
const-traits
/
ice-121536-const-method.rs
blob: a1dbd7551b7b5c89160c88379d55e010f6fee485 [
file
]
#![
feature
(
const_trait_impl
)]
pub
struct
Vec3
;
pub
const
trait
Add
{
fn
add
(
self
)
->
Vec3
;
}
impl
Add
for
Vec3
{
const
fn
add
(
self
)
->
Vec3
{
//~^ ERROR functions in trait impls cannot be declared const
self
}
}
fn
main
()
{}