Skip to content

Commit 24f8589

Browse files
committed
Fix nits
1 parent c0bee60 commit 24f8589

File tree

1 file changed

+7
-8
lines changed

1 file changed

+7
-8
lines changed

src/libcore/intrinsics.rs

+7-8
Original file line numberDiff line numberDiff line change
@@ -284,8 +284,8 @@ extern "rust-intrinsic" {
284284
///
285285
/// `transmute` is semantically equivalent to a bitwise move of one type
286286
/// into another. It copies the bits from the destination type into the
287-
/// source type, then forgets the original. If you know C or C++, it's like
288-
/// `memcpy` under the hood.
287+
/// source type, then forgets the original. It's equivalent to C's `memcpy`
288+
/// under the hood, just like `transmute_copy`.
289289
///
290290
/// `transmute` is incredibly unsafe. There are a vast number of ways to
291291
/// cause undefined behavior with this function. `transmute` should be
@@ -299,7 +299,7 @@ extern "rust-intrinsic" {
299299
/// There are a few things that `transmute` is really useful for.
300300
///
301301
/// Getting the bitpattern of a floating point type (or, more generally,
302-
/// type punning, when T and U aren't pointers):
302+
/// type punning, when `T` and `U` aren't pointers):
303303
///
304304
/// ```
305305
/// let bitpattern = unsafe {
@@ -339,11 +339,10 @@ extern "rust-intrinsic" {
339339
/// # Alternatives
340340
///
341341
/// However, many uses of `transmute` can be achieved through other means.
342-
/// `transmute` can transform
343-
/// any type into any other, with just the caveat that they're the same
344-
/// size, and it sometimes results in interesting results. Below are common
345-
/// applications of `transmute` which can be replaced with safe applications
346-
/// of `as`:
342+
/// `transmute` can transform any type into any other, with just the caveat
343+
/// that they're the same size, and often interesting results occur. Below
344+
/// are common applications of `transmute` which can be replaced with safe
345+
/// applications of `as`:
347346
///
348347
/// Turning a pointer into a `usize`:
349348
///

0 commit comments

Comments
 (0)