diff options
author | bors-servo <lbergstrom+bors@mozilla.com> | 2017-01-19 07:05:37 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-01-19 07:05:37 -0800 |
commit | 77278fc0ea94de171ee93a1a6b0a8a9d7eeed052 (patch) | |
tree | b020e01e689a41516ae57c9cde1a6a686f399575 /libbindgen/src/codegen/helpers.rs | |
parent | f103d8a66d4c736f97d7e98c3698b5542e38d28c (diff) | |
parent | 0ceeaf8d34b85da08a127db6668854b9ca5a1a54 (diff) |
Auto merge of #396 - emilio:enum-alias, r=fitzgen
codegen: Prefer use instead of type aliases.
r? @fitzgen
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) } |