Update other-reprs.md

pull/464/head
nomicon-kr 9 months ago committed by GitHub
parent 5cd6ad872c
commit 721f87bc19
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -40,16 +40,14 @@
또, 그 유일한 필드가 FFI로 보내도 괜찮은 타입이라면, 그 유일한 필드가 있는 구조체/열거형을 FFI로 보내는 작업도 잘 작동하는 것이 보장됩니다. 예를 들어, 이것은 `struct Foo(f32)``enum Foo { Bar(f32) }``f32`와 항상 동일한 ABI를 가지게 하도록 하기 위해서 꼭 필요합니다. 또, 그 유일한 필드가 FFI로 보내도 괜찮은 타입이라면, 그 유일한 필드가 있는 구조체/열거형을 FFI로 보내는 작업도 잘 작동하는 것이 보장됩니다. 예를 들어, 이것은 `struct Foo(f32)``enum Foo { Bar(f32) }``f32`와 항상 동일한 ABI를 가지게 하도록 하기 위해서 꼭 필요합니다.
이 표현 방식은 타입의 유일한 필드가 `pub`이거나, 그 레이아웃이 이 표현 방식은 타입의 유일한 필드가 `pub`이거나, 그 레이아웃이 단순하게 묘사되었을 경우에만 공개 ABI의 한 부분으로 인정됩니다. 그렇지 않다면 이 레이아웃은 다른 크레이트들이 의존해서는 안됩니다.
This repr is only considered part of the public ABI of a type if either the single 더 자세한 내용은 [RFC 1758][rfc-transparent]과 [RFC 2645][rfc-transparent-unions-enums]에 있습니다.
field is `pub`, or if its layout is documented in prose. Otherwise, the layout should
not be relied upon by other crates.
More details are in the [RFC 1758][rfc-transparent] and the [RFC 2645][rfc-transparent-unions-enums].
## repr(u*), repr(i*) ## repr(u*), repr(i*)
이것들은 필드 없는 열거형을 만들기 위한 크기를 지정합니다.
These specify the size to make a fieldless enum. If the discriminant overflows These specify the size to make a fieldless enum. If the discriminant overflows
the integer it has to fit in, it will produce a compile-time error. You can the integer it has to fit in, it will produce a compile-time error. You can
manually ask Rust to allow this by setting the overflowing element to explicitly manually ask Rust to allow this by setting the overflowing element to explicitly

Loading…
Cancel
Save