diff options
| author | Oliver 'ker' Schneider <rust19446194516@oli-obk.de> | 2015-06-07 19:50:13 +0200 |
|---|---|---|
| committer | Oliver 'ker' Schneider <rust19446194516@oli-obk.de> | 2015-06-07 19:50:13 +0200 |
| commit | ec078a033bdd2a4d076f78f2e655b8c3e5e4bf6a (patch) | |
| tree | 1ec3554c23443ccc25e44eb90efa4f176fe33df9 /src/libsyntax | |
| parent | 2c8d75d655b7d0bf84178f464c47a79569a35f3c (diff) | |
| download | rust-ec078a033bdd2a4d076f78f2e655b8c3e5e4bf6a.tar.gz rust-ec078a033bdd2a4d076f78f2e655b8c3e5e4bf6a.zip | |
change some statics to constants
Diffstat (limited to 'src/libsyntax')
| -rw-r--r-- | src/libsyntax/diagnostics/plugin.rs | 3 | ||||
| -rw-r--r-- | src/libsyntax/ext/format.rs | 1 |
2 files changed, 2 insertions, 2 deletions
diff --git a/src/libsyntax/diagnostics/plugin.rs b/src/libsyntax/diagnostics/plugin.rs index 620ac1280f4..54b09d863a3 100644 --- a/src/libsyntax/diagnostics/plugin.rs +++ b/src/libsyntax/diagnostics/plugin.rs @@ -200,9 +200,8 @@ pub fn expand_build_diagnostic_array<'cx>(ecx: &'cx mut ExtCtxt, ident: name.clone(), attrs: Vec::new(), id: ast::DUMMY_NODE_ID, - node: ast::ItemStatic( + node: ast::ItemConst( ty, - ast::MutImmutable, expr, ), vis: ast::Public, diff --git a/src/libsyntax/ext/format.rs b/src/libsyntax/ext/format.rs index 4fe5ab15545..86e72d4ef03 100644 --- a/src/libsyntax/ext/format.rs +++ b/src/libsyntax/ext/format.rs @@ -452,6 +452,7 @@ impl<'a, 'b> Context<'a, 'b> { Some(ecx.lifetime(sp, special_idents::static_lifetime.name)), ast::MutImmutable); let slice = ecx.expr_vec_slice(sp, pieces); + // static instead of const to speed up codegen by not requiring this to be inlined let st = ast::ItemStatic(ty, ast::MutImmutable, slice); let name = ecx.ident_of(name); |
