Skip to content

Commit

Permalink
Guard with cfg...
Browse files Browse the repository at this point in the history
cargo-test-sbf (governance/addin-mock/program, governance/program):
error[E0658]: use of unstable library feature 'once_cell'
   --> src/abi_example.rs:559:36
     |
 559 | impl<T: AbiExample> AbiExample for std::sync::OnceLock<T> {
     |                                    ^^^^^^^^^^^^^^^^^^^^^^
     |
     = note: see issue #74465 <rust-lang/rust#74465> for more information
     = help: add `#![feature(once_cell)]` to the crate attributes to enable
  • Loading branch information
ryoqun committed Oct 4, 2023
1 parent e769318 commit a30a797
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions frozen-abi/src/abi_example.rs
Original file line number Diff line number Diff line change
Expand Up @@ -556,6 +556,7 @@ impl<O: AbiEnumVisitor, E: AbiEnumVisitor> AbiEnumVisitor for Result<O, E> {
}
}

#[cfg(not(target_os = "solana"))]
impl<T: AbiExample> AbiExample for std::sync::OnceLock<T> {
fn example() -> Self {
Self::from(T::example())
Expand Down

0 comments on commit a30a797

Please sign in to comment.