Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clean up warnings + unsafe_op_in_unsafe_fn when building std for armv6k-nintendo-3ds #127996

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions library/std/src/os/horizon/mod.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
//! Definitions for Horizon OS

#![forbid(unsafe_op_in_unsafe_fn)]
#![stable(feature = "raw_ext", since = "1.1.0")]

pub mod fs;
Expand Down
1 change: 1 addition & 0 deletions library/std/src/os/horizon/raw.rs
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ pub type time_t = libc::time_t;
#[repr(C)]
#[derive(Clone)]
#[stable(feature = "raw_ext", since = "1.1.0")]
#[allow(dead_code)] // This exists for parity with other `raw` modules, but isn't actually used.
pub struct stat {
#[stable(feature = "raw_ext", since = "1.1.0")]
pub st_dev: dev_t,
Expand Down
2 changes: 1 addition & 1 deletion library/std/src/sys/pal/unix/alloc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ cfg_if::cfg_if! {
))] {
#[inline]
unsafe fn aligned_malloc(layout: &Layout) -> *mut u8 {
libc::memalign(layout.align(), layout.size()) as *mut u8
unsafe { libc::memalign(layout.align(), layout.size()) as *mut u8 }
}
} else {
#[inline]
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
use crate::fmt;
use crate::io;
use crate::num::NonZero;
use crate::sys::pal::unix::unsupported::*;
Expand Down
Loading