gccrs: Handle `async` functions in traits
[official-gcc.git] / gcc / testsuite / rust / compile / issue-2070.rs
blob981e59926fbb95cf096b1034b9e5351f1d4b65f3
1 #[lang = "sized"]
2 pub trait Sized {}
4 trait Foo {
5     fn get(self) -> i32;
8 struct Bar(i32);
9 impl Foo for Bar {
10     fn get(self) -> i32 {
11         self.0
12     }
15 fn type_bound_test<T: Foo>(a: T) -> i32 {
16     Foo::get(a)
19 fn main() {
20     let a;
21     a = Bar(456);
23     let b;
24     b = type_bound_test(a);