Debian Codegraph @

gcc/testsuite/rust/compile/torture/mod3.rs

raw
1 // { dg-additional-options "-w" }
2 mod A {
3 pub mod B {
4 pub mod C {
5 pub struct Foo {
6 pub f: i32,
7 }
8 impl Foo {
9 pub fn new() -> Self {
10 Foo { f: 23i32 }
11 }
12 }
13 }
14 }
15 }
16
17 fn main() -> i32 {
18 let a = A::B::C::Foo::new();
19 let b = A::B::C::Foo { f: -23i32 };
20
21 a.f - b.f
22 }