File tree Expand file tree Collapse file tree 3 files changed +3
-6
lines changed
formality-rust/src/grammar Expand file tree Collapse file tree 3 files changed +3
-6
lines changed Original file line number Diff line number Diff line change @@ -342,7 +342,6 @@ impl Check<'_> {
342
342
. unwrap ( ) ;
343
343
344
344
// Find the callee from current crate.
345
- // FIXME: get the information from decl too
346
345
let callee = curr_crate. items . iter ( ) . find ( |item| {
347
346
match item {
348
347
CrateItem :: Fn ( fn_declared) => {
Original file line number Diff line number Diff line change @@ -141,10 +141,7 @@ pub enum ValueExpression {
141
141
Constant ( ConstTypePair ) ,
142
142
#[ grammar( fn_id $v0) ]
143
143
Fn ( FnId ) ,
144
- // FIXME: minirust uses typle to represent arrays, structs, tuples (including unit).
145
- // But I think it will be quite annoying to do typecking when we have all these types
146
- // together, so I added a variant just for struct.
147
- #[ grammar( struct ${ v0} as $v1) ] // FIXME: use comma separated
144
+ #[ grammar( struct { $, v0} as $v1) ]
148
145
Struct ( Vec < ValueExpression > , Ty ) ,
149
146
// Union
150
147
// Variant
Original file line number Diff line number Diff line change @@ -262,6 +262,7 @@ fn test_struct() {
262
262
crate Foo {
263
263
struct Dummy {
264
264
value: u32 ,
265
+ is_true: bool ,
265
266
}
266
267
267
268
fn foo ( u32 ) -> u32 = minirust( v1) -> v0 {
@@ -272,7 +273,7 @@ fn test_struct() {
272
273
bb0: {
273
274
statements {
274
275
local( v0) = load( local( v1) ) ;
275
- local( v2) = struct { constant( 1 : u32 ) } as Dummy ;
276
+ local( v2) = struct { constant( 1 : u32 ) , constant ( false ) } as Dummy ;
276
277
local( v2) . 0 = constant( 2 : u32 ) ;
277
278
}
278
279
return ;
You can’t perform that action at this time.
0 commit comments