]> git.proxmox.com Git - rustc.git/blob - tests/ui/issues/issue-3668.rs
New upstream version 1.68.2+dfsg1
[rustc.git] / tests / ui / issues / issue-3668.rs
1 struct P { child: Option<Box<P>> }
2 trait PTrait {
3 fn getChildOption(&self) -> Option<Box<P>>;
4 }
5
6 impl PTrait for P {
7 fn getChildOption(&self) -> Option<Box<P>> {
8 static childVal: Box<P> = self.child.get();
9 //~^ ERROR attempt to use a non-constant value in a constant
10 panic!();
11 }
12 }
13
14 fn main() {}