let mut test_const = cx.item(sp, ast::Ident::new(item.ident.name, sp),
vec![
// #[cfg(test)]
- cx.attribute(cx.meta_list(attr_sp, sym::cfg, vec![
- cx.meta_list_item_word(attr_sp, sym::test)
+ cx.attribute(attr::mk_list_item(ast::Ident::new(sym::cfg, attr_sp), vec![
+ attr::mk_nested_word_item(ast::Ident::new(sym::test, attr_sp))
])),
// #[rustc_test_marker]
cx.attribute(cx.meta_word(attr_sp, sym::rustc_test_marker)),
// type implements the `Termination` trait as `libtest` enforces that.
let has_output = match decl.output {
ast::FunctionRetTy::Default(..) => false,
- ast::FunctionRetTy::Ty(ref t) if t.node.is_unit() => false,
+ ast::FunctionRetTy::Ty(ref t) if t.kind.is_unit() => false,
_ => true
};