Skip to content

Commit e28566d

Browse files
committed
Add comment addressing Issue rust-lang#73682
1 parent 04857a8 commit e28566d

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

library/core/src/ops/deref.rs

+4
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,10 @@
8888
/// implicitly. In the majority of uses it should be infallible, though it may
8989
/// be acceptable to panic if the type is misused through programmer error, for
9090
/// example.
91+
///
92+
/// However, infallibility is not enforced and therefore not guaranteed.
93+
/// As such, `unsafe` code should not rely on infallibility in general for
94+
/// soundness.
9195
///
9296
/// [book]: ../../book/ch15-02-deref.html
9397
/// [coercion]: #deref-coercion

0 commit comments

Comments
 (0)