]> git.lizzy.rs Git - rust.git/blob - src/test/codegen/fn-impl-trait-self.rs
Add 'src/tools/rust-analyzer/' from commit '977e12a0bdc3e329af179ef3a9d466af9eb613bb'
[rust.git] / src / test / codegen / fn-impl-trait-self.rs
1 // compile-flags: -g
2 //
3 // CHECK-LABEL: @main
4 // MSVC: {{.*}}DIDerivedType(tag: DW_TAG_pointer_type, name: "recursive_type$ (*)()",{{.*}}
5 // NONMSVC: {{.*}}DIDerivedType(tag: DW_TAG_pointer_type, name: "fn() -> <recursive_type>",{{.*}}
6 //
7 // CHECK: {{.*}}DISubroutineType{{.*}}
8 // CHECK: {{.*}}DIBasicType(name: "<recur_type>", size: {{32|64}}, encoding: DW_ATE_unsigned)
9
10 pub fn foo() -> impl Copy {
11     foo
12 }
13
14 fn main() {
15     let my_res = foo();
16 }