Debian Codegraph @

gcc/testsuite/rust/compile/issue-1019.rs

raw
1 #[lang = "sized"]
2 pub trait Sized {}
3
4 trait A<T> {
5 type Output;
6
7 fn test(self, a: &T) -> &Self::Output;
8 }
9
10 struct Foo<T> {
11 // { dg-warning "struct is never constructed" "" { target *-*-* } .-1 }
12 start: T,
13 end: T,
14 }
15
16 impl<X> A<X> for Foo<usize> {
17 type Output = X;
18
19 fn test(self, a: &X) -> &Self::Output {
20 a
21 }
22 }