diff --git a/tests/test_generics.rs b/tests/test_generics.rs index 3fa0adff8..ff247c32f 100644 --- a/tests/test_generics.rs +++ b/tests/test_generics.rs @@ -1,5 +1,6 @@ use syntax::ast; use syntax::ptr::P; +use syntax::codemap::DUMMY_SP; use aster::AstBuilder; @@ -17,6 +18,7 @@ fn test_empty() { id: ast::DUMMY_NODE_ID, predicates: vec![], }, + span: DUMMY_SP, } ); } @@ -44,6 +46,7 @@ fn test_with_ty_params_and_lifetimes() { id: ast::DUMMY_NODE_ID, predicates: vec![], }, + span: DUMMY_SP, } ); } diff --git a/tests/test_item.rs b/tests/test_item.rs index 368e3ccf3..5f51fe0c0 100644 --- a/tests/test_item.rs +++ b/tests/test_item.rs @@ -31,7 +31,7 @@ fn test_fn() { node: ast::ItemKind::Fn( builder.fn_decl().return_().isize(), ast::Unsafety::Normal, - ast::Constness::NotConst, + respan(DUMMY_SP, ast::Constness::NotConst), Abi::Rust, builder.generics().build(), block @@ -69,7 +69,7 @@ fn test_generic_fn() { node: ast::ItemKind::Fn( builder.fn_decl().return_().isize(), ast::Unsafety::Normal, - ast::Constness::NotConst, + respan(DUMMY_SP, ast::Constness::NotConst), Abi::Rust, builder.generics() .lifetime("'a").build() @@ -343,16 +343,17 @@ fn test_use() { ast::ViewPathList( builder.path().ids(&["std", "vec"]).build(), vec![ - respan(DUMMY_SP, ast::PathListItemKind::Mod { + respan(DUMMY_SP, ast::PathListItem_ { + name: keywords::SelfValue.ident(), id: ast::DUMMY_NODE_ID, rename: None }), - respan(DUMMY_SP, ast::PathListItemKind::Ident { + respan(DUMMY_SP, ast::PathListItem_ { name: "Vec".to_ident(), id: ast::DUMMY_NODE_ID, rename: None }), - respan(DUMMY_SP, ast::PathListItemKind::Ident { + respan(DUMMY_SP, ast::PathListItem_ { name: "IntoIter".to_ident(), id: ast::DUMMY_NODE_ID, rename: None @@ -557,7 +558,7 @@ fn test_trait() { node: ast::TraitItemKind::Method( ast::MethodSig { unsafety: ast::Unsafety::Normal, - constness: ast::Constness::NotConst, + constness: respan(DUMMY_SP, ast::Constness::NotConst), abi: Abi::Rust, decl: builder.fn_decl().default_return(), generics: builder.generics().build(), @@ -645,7 +646,7 @@ fn test_impl() { node: ast::ImplItemKind::Method( ast::MethodSig { unsafety: ast::Unsafety::Normal, - constness: ast::Constness::NotConst, + constness: respan(DUMMY_SP, ast::Constness::NotConst), abi: Abi::Rust, decl: builder.fn_decl().default_return(), generics: builder.generics().build(),