diff options
author | Charisee <chiw@google.com> | 2024-04-02 16:16:30 +0000 |
---|---|---|
committer | Charisee Chiw <chiw@google.com> | 2024-04-02 16:18:23 +0000 |
commit | 4339115a793689986a91165dd516845ce5344a59 (patch) | |
tree | ed09b98effa1f83e74fcc592e7cdafd8940ba09e | |
parent | 2fc36745c1ee670e471294a89130d95c2675ab85 (diff) | |
download | security-4339115a793689986a91165dd516845ce5344a59.tar.gz |
Update needed for Rust v1.77.1
error: initializer for `thread_local` value can be made `const`
--> system/security/keystore2/src/database.rs:5022:47
|
5022 | static RANDOM_COUNTER: RefCell<i64> = RefCell::new(0);
| ^^^^^^^^^^^^^^^ help: replace with: `const { RefCell::new(0) }`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#thread_local_initializer_can_be_made_const
= note: `-D clippy::thread-local-initializer-can-be-made-const` implied by `-D warnings`
= help: to override `-D warnings` add `#[allow(clippy::thread_local_initializer_can_be_made_const)]`
error: aborting due to 1 previous error
Bug: http://b/330185853
Test: ./test_compiler.py --prebuilt-path dist/rust-dev.tar.xz --target aosp_cf_x86_64_phone --image
Change-Id: Ic583a76f7ea7fc27ce6c214b3247748d7dbaa1b4
-rw-r--r-- | keystore2/src/database.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/keystore2/src/database.rs b/keystore2/src/database.rs index 113c049b..dd64764b 100644 --- a/keystore2/src/database.rs +++ b/keystore2/src/database.rs @@ -5019,7 +5019,7 @@ pub mod tests { // This allows us to test repeated elements. thread_local! { - static RANDOM_COUNTER: RefCell<i64> = RefCell::new(0); + static RANDOM_COUNTER: RefCell<i64> = const { RefCell::new(0) }; } fn reset_random() { |