diff options
| author | Patrick Walton <pcwalton@mimiga.net> | 2014-01-15 17:15:39 -0800 |
|---|---|---|
| committer | Huon Wilson <dbau.pp+github@gmail.com> | 2014-02-02 01:44:48 +1100 |
| commit | b496d7bec2a79feab092e6b4e251f7b0cee2a6a6 (patch) | |
| tree | 30bc26c3763372bb231dc24f7e34d666aaa9a6fb /src/librustc/middle/trans | |
| parent | 8d6ef2e1b198461fde48565c7efdf92a83a33abd (diff) | |
| download | rust-b496d7bec2a79feab092e6b4e251f7b0cee2a6a6.tar.gz rust-b496d7bec2a79feab092e6b4e251f7b0cee2a6a6.zip | |
libsyntax: Make float literals not use `@str`
Diffstat (limited to 'src/librustc/middle/trans')
| -rw-r--r-- | src/librustc/middle/trans/consts.rs | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/librustc/middle/trans/consts.rs b/src/librustc/middle/trans/consts.rs index ddab6407f9d..8f69b3cc2f2 100644 --- a/src/librustc/middle/trans/consts.rs +++ b/src/librustc/middle/trans/consts.rs @@ -57,12 +57,14 @@ pub fn const_lit(cx: &CrateContext, e: &ast::Expr, lit: ast::Lit) ty_to_str(cx.tcx, lit_int_ty))) } } - ast::LitFloat(fs, t) => C_floating(fs, Type::float_from_ty(t)), - ast::LitFloatUnsuffixed(fs) => { + ast::LitFloat(ref fs, t) => { + C_floating(fs.get(), Type::float_from_ty(t)) + } + ast::LitFloatUnsuffixed(ref fs) => { let lit_float_ty = ty::node_id_to_type(cx.tcx, e.id); match ty::get(lit_float_ty).sty { ty::ty_float(t) => { - C_floating(fs, Type::float_from_ty(t)) + C_floating(fs.get(), Type::float_from_ty(t)) } _ => { cx.sess.span_bug(lit.span, |
