From 9675e000acd04a208056219f7f55c476cde961ce Mon Sep 17 00:00:00 2001 From: nomicon-kr Date: Tue, 25 Jun 2024 23:27:08 +0900 Subject: [PATCH] Update repr-rust.md --- src/repr-rust.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/repr-rust.md b/src/repr-rust.md index 89d1e36..f8b3099 100644 --- a/src/repr-rust.md +++ b/src/repr-rust.md @@ -124,7 +124,7 @@ struct FooRepr { 하지만 어떤 몇 가지 경우에서는 이런 표현은 비효율적입니다. 전통적인 경우는 러스트의 "널 포인터 최적화"입니다: 하나의 `()`을 가진 형(예를 들어 `None`)과 (중첩될 수도 있는) 널이 될 수 없는 포인터를 가진 형(예를 들어 `Some(&T)`)이 있는 열거형은 태그가 필요하지 않습니다. 널 포인터는 안전하게 `()` 형(`None`)으로 해석할 수 있거든요. -최종적인 결과는, 예를 들어, 이랗게 됩니다: `size_of::>() == size_of::<&T>()` +최종적인 결과는, 예를 들어, 이렇게 됩니다: `size_of::>() == size_of::<&T>()` 러스트에는 널이 될 수 없는 타입이나, 이를 포함하는 타입들이 많이 있는데, `Box`, `Vec`, `String`, `&T`, 그리고 `&mut T` 같은 것들입니다. Similarly, one can imagine nested enums pooling their tags into a single discriminant, as they are by