-
Notifications
You must be signed in to change notification settings - Fork 10
Translate transmutes.md #37
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
The first "transmute" refers to transmute function, not the actual transmuting.
This description means that it is possible to copy the first part of the value type `T`.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
overall lgtm. let me know what you think about the two minor suggestions.
src/transmutes.md
Outdated
いくら強調しようとも、強調しきれません。これは本当に、マジで、 Rust で出来る | ||
最も恐ろしいアンセーフなことです。ここではガードレールは爪楊枝のようなものです。 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
Just a quick idea to make "dental floss" analogy clearer:
ここではガードレールは爪楊枝のように脆いです。
Curious to know your thoughts.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
It's easier to understand what the statement means.
src/transmutes.md
Outdated
|
||
`mem::transmute<T, U>` は型 `T` の値を受け取り、その値が型 `U` であると再解釈します。 | ||
唯一の制約は、 `T` と `U` が同じサイズを持つとされていることです。 | ||
この操作によって未定義動作が起こる方法には気が遠くなります。 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
この操作によって未定義動作が起こる方法を考えると、気が遠くなります。
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
No description provided.