Bump rust-sysroot to v0.13 (#14001)

This commit is contained in:
Jack May
2020-12-07 13:26:12 -08:00
committed by GitHub
parent 38485489c9
commit be0f9d4837
14 changed files with 104 additions and 40 deletions

View File

@@ -1,8 +1,24 @@
//! @brief Example Rust-based BPF program that panics
extern crate solana_program;
#[cfg(all(feature = "custom-panic", target_arch = "bpf"))]
#[no_mangle]
pub extern "C" fn entrypoint(_input: *mut u8) -> u64 {
panic!();
fn custom_panic(info: &core::panic::PanicInfo<'_>) {
// Note: Full panic reporting is included here for testing purposes
solana_program::msg!("program custom panic enabled");
solana_program::msg!(&format!("{}", info));
}
extern crate solana_program;
use solana_program::{
account_info::AccountInfo, entrypoint, entrypoint::ProgramResult, pubkey::Pubkey,
};
entrypoint!(process_instruction);
fn process_instruction(
_program_id: &Pubkey,
_accounts: &[AccountInfo],
_instruction_data: &[u8],
) -> ProgramResult {
assert_eq!(1, 2);
Ok(())
}