Skip to content
This repository was archived by the owner on Sep 14, 2023. It is now read-only.

Commit ba5cf65

Browse files
committed
Merge pull request #134 from zsiciarz/master
Update for recent changes in libsyntax
2 parents d29b10a + 18ffb56 commit ba5cf65

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

docopt_macros/src/macro.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,7 @@ impl<'a, 'b> MacParser<'a, 'b> {
182182
&token::Eof, sep, |p| MacParser::parse_type_annotation(p)
183183
)).into_iter()
184184
.map(|(ident, ty)| {
185-
let field_name = token::get_ident(ident).to_string();
185+
let field_name = ident.to_string();
186186
let key = ArgvMap::struct_field_to_key(&*field_name);
187187
(Atom::new(&*key), ty)
188188
})
@@ -259,15 +259,15 @@ impl<'a, 'b> MacParser<'a, 'b> {
259259
};
260260
if try!(self.p.eat(&token::Comma)) { return Ok(info); }
261261
let deriving = try!(self.p.parse_ident());
262-
if deriving.as_str() != "derive" {
262+
if deriving.name != "derive" {
263263
let err = format!("Expected 'derive' keyword but got '{}'",
264264
deriving);
265265
self.cx.span_err(self.cx.call_site(), &*err);
266266
return Err(FatalError);
267267
}
268268
while !try!(self.p.eat(&token::Comma)) {
269269
info.deriving.push(
270-
try!(self.p.parse_ident()).as_str().to_string());
270+
try!(self.p.parse_ident()).name.to_string());
271271
}
272272
Ok(info)
273273
}

0 commit comments

Comments
 (0)