Skip to content

Commit 24f8f42

Browse files
authored
Update maybe_uninit.rs
1 parent 25e8127 commit 24f8f42

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

library/core/src/mem/maybe_uninit.rs

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -284,11 +284,10 @@ use crate::{fmt, intrinsics, ptr, slice};
284284
/// and back will always produce the original value `t` again. This is true even if `t` contains [provenance]:
285285
/// the resulting value will have the same provenance as the original `t`.
286286
///
287-
/// Note a potential footgun: if `t` contains a reference, then there may be implicit reborrows of the
288-
/// reference any time it is copied, which may alter its provenance. In that case, while the value returned
289-
/// by `identity` is exactly the same as its argument, that value may immediately be reborrowed upon return,
290-
/// altering its provenance. This may make this call to `identity` behave as though it does *not* exactly
291-
/// preserve provenance.
287+
/// Note a potential footgun: if `t` contains a reference, then there may be implicit reborrows of the reference
288+
/// any time it is copied, which may alter its provenance. In that case, the value returned by `identity` may
289+
/// not be exactly the same as its argument. However, even in this case, it remains true that `identity` behaves
290+
/// the same as a function that just returns `t` immediately (i.e., `fn identity<T>(t: T) -> T { t }`).
292291
///
293292
/// [provenance]: crate::ptr#provenance
294293
///

0 commit comments

Comments
 (0)