diff --git a/rust/candid/src/types/internal.rs b/rust/candid/src/types/internal.rs index 5b8535b9..fe24bd95 100644 --- a/rust/candid/src/types/internal.rs +++ b/rust/candid/src/types/internal.rs @@ -626,9 +626,9 @@ pub fn unroll(t: &Type) -> Type { } thread_local! { - static ENV: RefCell> = RefCell::new(BTreeMap::new()); + static ENV: RefCell> = const { RefCell::new(BTreeMap::new()) }; // only used for TypeContainer - static ID: RefCell> = RefCell::new(BTreeMap::new()); + static ID: RefCell> = const { RefCell::new(BTreeMap::new()) }; static NAME: RefCell = RefCell::new(TypeName::default()); }