File tree Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -275,7 +275,15 @@ impl<T: ?Sized> DerefMut for &mut T {
275
275
}
276
276
}
277
277
278
- /// UwU
278
+ /// Perma-unstable marker trait. Indicates that the type has a well-behaved [`Deref`]
279
+ /// (and, if applicable, [`DerefMut`]) implementation. This is relied on for soundness
280
+ /// of deref patterns.
281
+ ///
282
+ /// FIXME(deref_patterns): The precise semantics are undecided; the rough idea is that
283
+ /// successive calls to `deref`/`deref_mut` without intermediate mutation should be
284
+ /// idempotent, in the sense that they return the same value as far as pattern-matching
285
+ /// is concerned. Calls to `deref`/`deref_mut`` must leave the pointer itself likewise
286
+ /// unchanged.
279
287
#[ unstable( feature = "deref_pure_trait" , issue = "87121" ) ]
280
288
#[ cfg_attr( not( bootstrap) , lang = "deref_pure" ) ]
281
289
pub unsafe trait DerefPure { }
You can’t perform that action at this time.
0 commit comments