Skip to content

Commit e1674e3

Browse files
committed
Merge pull request rust-lang#1045 from pnkfelix/fix-description-of-as
refine detail about what "old behavior" of `as` is.
2 parents d46a957 + fb6d9cb commit e1674e3

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

text/0560-integer-overflow.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -489,8 +489,8 @@ Since it was accepted, the RFC has been updated as follows:
489489
capability for libstd to declare inherent methods on primitive
490490
integral types.
491491
2. `as` was changed to restore the behavior before the RFC (that is,
492-
it truncates, as a C cast would).
493-
492+
it truncates to the target bitwidth and reinterprets the highest
493+
order bit, a.k.a. sign-bit, as necessary, as a C cast would).
494494

495495
# Acknowledgements and further reading
496496

0 commit comments

Comments
 (0)