blob: 0e1f19a75baeb1d7507f9a4cd349272b98aa666c [file] [log] [blame]
struct P { child: Option<Box<P>> }
trait PTrait {
fn getChildOption(&self) -> Option<Box<P>>;
}
impl PTrait for P {
fn getChildOption(&self) -> Option<Box<P>> {
static childVal: Box<P> = self.child.get();
//~^ ERROR attempt to use a non-constant value in a constant
panic!();
}
}
fn main() {}