asquared31415
asquared31415
The following code: ```rust pub fn bad() -> Result { Ok(0) } #[allow(improper_ctypes_definitions)] pub extern "C" fn good() -> Result { Ok(0) } ``` [godbolt LLVM IR](https://godbolt.org/z/b5jjv43nK) [godbolt ASM](https://godbolt.org/z/jKM8j6hEn) Both...
As of #97507 `rustfmt` is not downloaded until the user runs `x.py fmt`. The rustc dev guide suggests setting the formatter to the rustfmt that is downloaded for stage0 in...
`Uint8Array::view_mut_raw` (and all similar array view types) have a safety requirement [link](https://docs.rs/js-sys/latest/js_sys/struct.Uint8Array.html#method.view_mut_raw) that says: > Unsafety > Views into WebAssembly memory are only valid so long as the backing buffer...
The following code causes Miri to emit an error that I think does not properly describe the issue. ```rust #![feature(strict_provenance)] #![feature(pointer_byte_offsets)] use core::ptr; fn main() { unsafe { let base...
# Proposal ## Problem statement Logically there are 6 different behaviors that a conversion between two integers may have: 1. reinterpret bits 2. truncate bits 3. zero extend bits 4....
This code: ```rust fn uwu() { unsafe { #[forbid(unsafe_code)] let owo = (&1 as *const i32).read(); dbg!(owo); } } ``` [Playground](https://play.rust-lang.org/?version=nightly&mode=debug&edition=2021&gist=8719144958843eccae79d112912b9e33) Does not produce an error for using unsafe code...
**NOTE:** This is using `cargo clippy`, but the actual issue may be in the `lint_reasons` feature. If this is not appropriate for the rustc repo, let me know and I...
Fixes #131122 On zulip someone had a concern that it was legal to create a type with alignment `isize::MAX + 1`, but I do not believe this should be allowed...