diff options
| author | bors <bors@rust-lang.org> | 2015-06-08 04:54:59 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2015-06-08 04:54:59 +0000 |
| commit | bea1c4a78e5233ea6f85a2028a26e08c26635fca (patch) | |
| tree | bf33ebab8b39bb8d7aa7289e49062ad667169fe0 /src/libsyntax | |
| parent | 717e8831b6b81669f7d087a2a1d7f7e899bcea43 (diff) | |
| parent | ec078a033bdd2a4d076f78f2e655b8c3e5e4bf6a (diff) | |
| download | rust-bea1c4a78e5233ea6f85a2028a26e08c26635fca.tar.gz rust-bea1c4a78e5233ea6f85a2028a26e08c26635fca.zip | |
Auto merge of #25823 - oli-obk:static_to_const_lint, r=alexcrichton
r? @eddyb
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); |
