Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit7ddd7f8

Browse files
author
Erik Kaneda
committed
zkvm: add#[forbid(unsafe_op_in_unsafe_fn)] instdlib
This also adds an additional `unsafe` block to address compiler errors.
1 parent5e4edba commit7ddd7f8

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

‎std/src/sys/pal/zkvm/alloc.rs‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ use crate::alloc::{GlobalAlloc, Layout, System};
55
unsafeimplGlobalAllocforSystem{
66
#[inline]
77
unsafefnalloc(&self,layout:Layout) ->*mutu8{
8-
abi::sys_alloc_aligned(layout.size(), layout.align())
8+
unsafe{abi::sys_alloc_aligned(layout.size(), layout.align())}
99
}
1010

1111
#[inline]

‎std/src/sys/pal/zkvm/mod.rs‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
//! This is all super highly experimental and not actually intended for
77
//! wide/production use yet, it's still all in the experimental category. This
88
//! will likely change over time.
9+
#![forbid(unsafe_op_in_unsafe_fn)]
910

1011
constWORD_SIZE:usize = core::mem::size_of::<u32>();
1112

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp