Skip to content

Commit 1a76874

Browse files
ctzcpu
authored andcommitted
Disable clippy nightly warning about const TLS
This complains: > warning: initializer for `thread_local` value can be made `const` But doing the suggested fix breaks the build on our MSRV, with: > warning: a `const` item should never be interior mutable So we can't really win.
1 parent c8c02d9 commit 1a76874

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/lib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@ include!(concat!(env!("OUT_DIR"), "/version.rs"));
5454
// Rust code, we model these thread locals as a stack, so we can always
5555
// restore the previous version.
5656
thread_local! {
57+
#[allow(clippy::thread_local_initializer_can_be_made_const)]
5758
pub(crate) static USERDATA: RefCell<Vec<Userdata>> = RefCell::new(Vec::new());
5859
}
5960

0 commit comments

Comments
 (0)