Debian Codegraph @

gcc/testsuite/rust/compile/redef_error4.rs

raw
1 struct Foo(i32, bool);
2
3 impl Foo {
4 fn new(a: i32, b: bool) -> Foo {
5 Foo(a, b)
6 }
7
8 fn test() -> i32 {
9 test()
10 }
11
12 fn test() -> bool { // { dg-error "defined multiple times" }
13 true
14 }
15 }
16
17 fn test() -> i32 {
18 123
19 }
20
21 fn main() {
22 let a;
23 a = Foo::new(1, true);
24
25 let b;
26 b = Foo::test();
27 }