File tree Expand file tree Collapse file tree 2 files changed +43
-0
lines changed Expand file tree Collapse file tree 2 files changed +43
-0
lines changed Original file line number Diff line number Diff line change
1
+ // check-pass
2
+ // compile-flags: -C opt-level=3
3
+
4
+ #![ crate_type = "lib" ]
5
+
6
+ fn lambda < T : Default > ( ) -> T {
7
+ if true && let Some ( bar) = transform ( ) {
8
+ bar
9
+ } else {
10
+ T :: default ( )
11
+ }
12
+ }
13
+
14
+ fn transform < T > ( ) -> Option < T > {
15
+ None
16
+ }
Original file line number Diff line number Diff line change
1
+ // check-pass
2
+ // compile-flags: -C opt-level=3
3
+
4
+ #![ crate_type = "lib" ]
5
+
6
+ pub trait Backend {
7
+ type DescriptorSetLayout ;
8
+ }
9
+
10
+ pub struct Back ;
11
+
12
+ impl Backend for Back {
13
+ type DescriptorSetLayout = u32 ;
14
+ }
15
+
16
+ pub struct HalSetLayouts {
17
+ vertex_layout : <Back as Backend >:: DescriptorSetLayout ,
18
+ }
19
+
20
+ impl HalSetLayouts {
21
+ pub fn iter < DSL > ( self ) -> DSL
22
+ where
23
+ Back : Backend < DescriptorSetLayout = DSL > ,
24
+ {
25
+ self . vertex_layout
26
+ }
27
+ }
You can’t perform that action at this time.
0 commit comments