size_of_val
and min_align_of_val
intrinsics should be unsafe
#80668
Labels
A-intrinsics
Area: Intrinsics
E-easy
Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.
The unsafe functions
size_of_val_raw
&align_of_val_raw
are implemented usingsize_of_val
andmin_align_of_val
intrinsics, which are currently considered tobe safe.
The #69079 changed the API of those intrinsics to accept raw pointers instead
of references, but didn't update the safety of those intrinsics (the discussion
regarding safety can be found in aforementioned PR).
Function describing safety of intrinsics that needs to be updated (this will
also need to be accompanied by changes in the standard library):
rust/compiler/rustc_typeck/src/check/intrinsic.rs
Lines 66 to 67 in 8018418
The text was updated successfully, but these errors were encountered: