Skip to content

Commit 8894a9f

Browse files
committed
Drop 'static for pub const strings
Constant and static declaration have a 'static live time by default, that is already elided since 1.17. Clippy complains on this kind of strings that are present in the generated code. This patch remove the 'static live time for those strings. Fix rust-lang#1612 Signed-off-by: Alberto Planas <[email protected]>
1 parent b71e73b commit 8894a9f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/codegen/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -668,7 +668,7 @@ impl CodeGenerator for Var {
668668
let cstr = helpers::ast_ty::cstr_expr(string);
669669
result.push(quote! {
670670
#(#attrs)*
671-
pub const #canonical_ident : &'static #ty = #cstr ;
671+
pub const #canonical_ident : &#ty = #cstr ;
672672
});
673673
}
674674
Err(..) => {

0 commit comments

Comments
 (0)