Skip to content
This repository has been archived by the owner on May 6, 2020. It is now read-only.

Commit

Permalink
Fix tests for syntex 0.43
Browse files Browse the repository at this point in the history
  • Loading branch information
dtolnay committed Aug 31, 2016
1 parent a9d8689 commit ecd3f42
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 7 deletions.
3 changes: 3 additions & 0 deletions tests/test_generics.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
use syntax::ast;
use syntax::ptr::P;
use syntax::codemap::DUMMY_SP;

use aster::AstBuilder;

Expand All @@ -17,6 +18,7 @@ fn test_empty() {
id: ast::DUMMY_NODE_ID,
predicates: vec![],
},
span: DUMMY_SP,
}
);
}
Expand Down Expand Up @@ -44,6 +46,7 @@ fn test_with_ty_params_and_lifetimes() {
id: ast::DUMMY_NODE_ID,
predicates: vec![],
},
span: DUMMY_SP,
}
);
}
15 changes: 8 additions & 7 deletions tests/test_item.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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()
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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(),
Expand Down Expand Up @@ -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(),
Expand Down

0 comments on commit ecd3f42

Please sign in to comment.