From e28566daa750c81ac3fa715adf21afd659a2c947 Mon Sep 17 00:00:00 2001 From: jmaargh Date: Sat, 21 Oct 2023 20:40:22 +0100 Subject: [PATCH] Add comment addressing Issue #73682 --- library/core/src/ops/deref.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/library/core/src/ops/deref.rs b/library/core/src/ops/deref.rs index f8fe372efac88..087085e73b9b2 100644 --- a/library/core/src/ops/deref.rs +++ b/library/core/src/ops/deref.rs @@ -88,6 +88,10 @@ /// implicitly. In the majority of uses it should be infallible, though it may /// be acceptable to panic if the type is misused through programmer error, for /// example. +/// +/// However, infallibility is not enforced and therefore not guaranteed. +/// As such, `unsafe` code should not rely on infallibility in general for +/// soundness. /// /// [book]: ../../book/ch15-02-deref.html /// [coercion]: #deref-coercion