// known-bug: #110395 #![feature(const_trait_impl)] use std::marker::PhantomData; struct S(PhantomData); impl Copy for S {} impl Clone for S { fn clone(&self) -> Self { S(PhantomData) } } impl const std::ops::Add for S { type Output = Self; fn add(self, _: Self) -> Self { S(std::marker::PhantomData) } } const fn twice(arg: S) -> S { arg + arg } fn main() { let _ = twice(S(PhantomData::)); }