Skip to content

Commit

Permalink
Merge pull request #38 from japaric/fix-unit
Browse files Browse the repository at this point in the history
fix macro: `TyNil` has been removed, use zero-length `TyTup`
  • Loading branch information
BurntSushi committed Nov 17, 2014
2 parents 3ef9461 + ea73686 commit c255698
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion quickcheck_macros/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,12 @@ fn expand_meta_quickcheck(cx: &mut ExtCtxt,
let inner_ident = cx.expr_ident(span, prop.ident);
let check_call = cx.expr_call_global(span, check_path, vec![inner_ident]);
let body = cx.block(span, vec![inner_fn], Some(check_call));
let test = cx.item_fn(span, item.ident, Vec::new(), cx.ty_nil(), body);
let nil = P(ast::Ty {
id: ast::DUMMY_NODE_ID,
node: ast::TyTup(vec![]),
span: codemap::DUMMY_SP,
});
let test = cx.item_fn(span, item.ident, Vec::new(), nil, body);

// Copy attributes from original function
let mut attrs = item.attrs.clone();
Expand Down

0 comments on commit c255698

Please sign in to comment.