Skip to content

Commit 321877d

Browse files
committed
Clean up
1 parent e429d24 commit 321877d

File tree

3 files changed

+3
-6
lines changed

3 files changed

+3
-6
lines changed

crates/formality-check/src/mini_rust_check.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -342,7 +342,6 @@ impl Check<'_> {
342342
.unwrap();
343343

344344
// Find the callee from current crate.
345-
// FIXME: get the information from decl too
346345
let callee = curr_crate.items.iter().find(|item| {
347346
match item {
348347
CrateItem::Fn(fn_declared) => {

crates/formality-rust/src/grammar/minirust.rs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -141,10 +141,7 @@ pub enum ValueExpression {
141141
Constant(ConstTypePair),
142142
#[grammar(fn_id $v0)]
143143
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)]
148145
Struct(Vec<ValueExpression>, Ty),
149146
// Union
150147
// Variant

src/test/mir_fn_bodies.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -262,6 +262,7 @@ fn test_struct() {
262262
crate Foo {
263263
struct Dummy {
264264
value: u32,
265+
is_true: bool,
265266
}
266267

267268
fn foo (u32) -> u32 = minirust(v1) -> v0 {
@@ -272,7 +273,7 @@ fn test_struct() {
272273
bb0: {
273274
statements {
274275
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;
276277
local(v2).0 = constant(2: u32);
277278
}
278279
return;

0 commit comments

Comments
 (0)