Skip to content
This repository was archived by the owner on May 6, 2020. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/generics.rs
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ impl<F> GenericsBuilder<F>

pub fn with(self, generics: ast::Generics) -> Self {
self.with_lifetimes(generics.lifetimes.into_iter())
.with_ty_params(generics.ty_params.move_iter())
.with_ty_params(generics.ty_params.into_iter())
.with_predicates(generics.where_clause.predicates.into_iter())
}

Expand Down Expand Up @@ -200,7 +200,7 @@ impl<F> GenericsBuilder<F>

pub fn strip_ty_params(mut self) -> Self {
for ty_param in &mut self.ty_params {
ty_param.bounds = P::empty();
ty_param.bounds = P::new();
}
self
}
Expand Down
6 changes: 3 additions & 3 deletions src/item.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ use std::iter::IntoIterator;
use syntax::abi::Abi;
use syntax::ast;
use syntax::codemap::{DUMMY_SP, Span, respan};
use syntax::parse::token;
use syntax::parse::token::keywords;
use syntax::ptr::P;

use attr::AttrBuilder;
Expand Down Expand Up @@ -111,7 +111,7 @@ impl<F> ItemBuilder<F>

pub fn build_use(self, view_path: ast::ViewPath_) -> F::Result {
let item = ast::ItemKind::Use(P(respan(self.span, view_path)));
self.build_item_kind(token::special_idents::invalid, item)
self.build_item_kind(keywords::Invalid.ident(), item)
}

pub fn use_(self) -> PathBuilder<ItemUseBuilder<F>> {
Expand Down Expand Up @@ -1180,7 +1180,7 @@ impl<F> ItemImplBuilder<F>
self.trait_ref,
ty,
self.items);
self.builder.build_item_kind(token::special_idents::invalid, ty_)
self.builder.build_item_kind(keywords::Invalid.ident(), ty_)
}

pub fn with_items<I>(mut self, items: I) -> Self
Expand Down
2 changes: 1 addition & 1 deletion tests/test_generics.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ fn test_empty() {
generics,
ast::Generics {
lifetimes: vec![],
ty_params: P::empty(),
ty_params: P::new(),
where_clause: ast::WhereClause {
id: ast::DUMMY_NODE_ID,
predicates: vec![],
Expand Down
4 changes: 2 additions & 2 deletions tests/test_item.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
use syntax::abi::Abi;
use syntax::ast;
use syntax::codemap::{DUMMY_SP, respan};
use syntax::parse::token;
use syntax::parse::token::keywords;
use syntax::print::pprust;
use syntax::ptr::P;

Expand Down Expand Up @@ -268,7 +268,7 @@ fn test_use() {
assert_eq!(
item,
P(ast::Item {
ident: token::special_idents::invalid,
ident: keywords::Invalid.ident(),
attrs: vec![],
id: ast::DUMMY_NODE_ID,
node: ast::ItemKind::Use(
Expand Down
6 changes: 3 additions & 3 deletions tests/test_path.rs
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ fn test_option() {
types: P::from_vec(vec![
builder.ty().isize(),
]),
bindings: P::empty(),
bindings: P::new(),
}),
},
]
Expand Down Expand Up @@ -139,8 +139,8 @@ fn test_lifetimes() {
lifetimes: vec![
builder.lifetime("'a"),
],
types: P::empty(),
bindings: P::empty(),
types: P::new(),
bindings: P::new(),
}),
},
]
Expand Down
4 changes: 2 additions & 2 deletions tests/test_ty_param.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ fn test_ty_param_empty() {
ast::TyParam {
ident: builder.id("T"),
id: ast::DUMMY_NODE_ID,
bounds: P::empty(),
bounds: P::new(),
default: None,
span: DUMMY_SP,
}
Expand All @@ -36,7 +36,7 @@ fn test_ty_param_default() {
ast::TyParam {
ident: builder.id("T"),
id: ast::DUMMY_NODE_ID,
bounds: P::empty(),
bounds: P::new(),
default: Some(builder.ty().usize()),
span: DUMMY_SP,
}
Expand Down