summaryrefslogtreecommitdiff
path: root/libbindgen/src/codegen/helpers.rs
diff options
context:
space:
mode:
Diffstat (limited to 'libbindgen/src/codegen/helpers.rs')
-rw-r--r--libbindgen/src/codegen/helpers.rs5
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)
}