diff options
author | Emilio Cobos Álvarez <emilio@crisal.io> | 2017-01-13 21:19:10 +0100 |
---|---|---|
committer | Emilio Cobos Álvarez <emilio@crisal.io> | 2017-01-13 21:19:10 +0100 |
commit | aaa7280a08b65aebe42b5405aec2bf72ae780885 (patch) | |
tree | 88644aee06f8dc7b42e6aea475c85fb3e9b1fbe8 /libbindgen/src/codegen/helpers.rs | |
parent | 8c54a566457a1c4aacabf72977380c25c7fa10a1 (diff) |
Update aster and syntex.
Diffstat (limited to 'libbindgen/src/codegen/helpers.rs')
-rw-r--r-- | libbindgen/src/codegen/helpers.rs | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/libbindgen/src/codegen/helpers.rs b/libbindgen/src/codegen/helpers.rs index c09f0071..b4cc75f5 100644 --- a/libbindgen/src/codegen/helpers.rs +++ b/libbindgen/src/codegen/helpers.rs @@ -153,7 +153,7 @@ pub mod ast_ty { } pub fn float_expr(f: f64) -> P<ast::Expr> { - use aster::str::ToInternedString; + use aster::symbol::ToSymbol; let mut string = f.to_string(); // So it gets properly recognised as a floating point constant. @@ -161,8 +161,7 @@ pub mod ast_ty { string.push('.'); } - let interned_str = string.as_str().to_interned_string(); - let kind = ast::LitKind::FloatUnsuffixed(interned_str); + let kind = ast::LitKind::FloatUnsuffixed(string.as_str().to_symbol()); aster::AstBuilder::new().expr().lit().build_lit(kind) } |