]> git.lizzy.rs Git - rust.git/blob - tests/codegen/fn-impl-trait-self.rs
Rollup merge of #107555 - edward-shen:edward-shen/dup-trait-suggestion, r=compiler...
[rust.git] / tests / 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 }