We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 14619de commit a0ed4d8Copy full SHA for a0ed4d8
library/core/src/ops/deref.rs
@@ -213,6 +213,10 @@ impl<T: ?Sized> Deref for &mut T {
213
/// it may be acceptable to panic if the type is misused through programmer
214
/// error, for example.
215
///
216
+/// However, infallibility is not enforced and therefore not guaranteed.
217
+/// As such, `unsafe` code should not rely on infallibility in general for
218
+/// soundness.
219
+///
220
/// [book]: ../../book/ch15-02-deref.html
221
/// [coercion]: #mutable-deref-coercion
222
/// [implementing]: Deref#when-to-implement-deref-or-derefmut
0 commit comments