Debian Codegraph @

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

raw
1 #[lang = "sized"]
2 trait Sized {}
3
4 fn main() {
5 pub trait Foo {
6 type A;
7 fn boo(&self) -> <Self as Foo>::A;
8 }
9
10 struct Bar;
11
12 impl Foo for isize {
13 type A = usize;
14 fn boo(&self) -> usize {
15 42
16 }
17 }
18
19 fn baz<I>(x: &<I as Foo<A = Bar>>::A) {}
20 // { dg-error "associated type bindings are not allowed here .E0229." "" { target *-*-* } .-1 }
21 }