Debian Codegraph @

gcc/testsuite/rust/compile/issue-3402-2.rs

raw
1 pub struct Bar(i32);
2
3 #[lang = "sized"]
4 trait Sized {}
5
6 pub trait A: Sized {
7 fn foo() -> Self;
8 }
9
10 impl A for i32 {
11 fn foo() -> Self {
12 0
13 }
14 }
15
16 pub fn bar() {
17 let _ = Bar(A::foo());
18 }