diff options
| author | Dylan DPC <99973273+Dylan-DPC@users.noreply.github.com> | 2022-08-14 17:09:17 +0530 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-08-14 17:09:17 +0530 |
| commit | 9de9786ef84f09b367d99bcce6e59a4ed75acd64 (patch) | |
| tree | d63a94dc1432882fa5856a412d0c28d40e978cfd /compiler | |
| parent | 38bc93730bcea6c0e6020fbf01a9e00c2a627e83 (diff) | |
| parent | 6b19a48e708609b456d3a6e90cafd63a6c348e86 (diff) | |
| download | rust-9de9786ef84f09b367d99bcce6e59a4ed75acd64.tar.gz rust-9de9786ef84f09b367d99bcce6e59a4ed75acd64.zip | |
Rollup merge of #100487 - tmiasko:assert-safe, r=petrochenkov
`assert_{inhabited,zero_valid,uninit_valid}` intrinsics are safe
Those intrinsics either panic or do nothing. They are safe.
Diffstat (limited to 'compiler')
| -rw-r--r-- | compiler/rustc_typeck/src/check/intrinsic.rs | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/compiler/rustc_typeck/src/check/intrinsic.rs b/compiler/rustc_typeck/src/check/intrinsic.rs index 3f2a0da8d65..05686be5d4b 100644 --- a/compiler/rustc_typeck/src/check/intrinsic.rs +++ b/compiler/rustc_typeck/src/check/intrinsic.rs @@ -69,6 +69,9 @@ pub fn intrinsic_operation_unsafety(intrinsic: Symbol) -> hir::Unsafety { // to note that it's safe to call, since // safe extern fns are otherwise unprecedented. sym::abort + | sym::assert_inhabited + | sym::assert_zero_valid + | sym::assert_uninit_valid | sym::size_of | sym::min_align_of | sym::needs_drop |
