From 4c9d3fa2a6cd19ce0041d56e43c6f7ca958171e4 Mon Sep 17 00:00:00 2001 From: Vincent Ambo Date: Fri, 12 Aug 2022 17:21:24 +0300 Subject: chore(tvix/eval): explicitly set #[repr(transparent)] on wrappers For representation wrappers that are used to control the visibility of type internals, this ensures that the wrapper does not increase the size of the type. In practice, the optimiser likely does this anyways but it is good to guarantee it. Change-Id: Ic6df7d668fe6006dfbd5b6cfcfc2088afa95b810 Reviewed-on: https://cl.tvl.fyi/c/depot/+/6178 Tested-by: BuildkiteCI Reviewed-by: grfn --- tvix/eval/src/value/string.rs | 1 + 1 file changed, 1 insertion(+) (limited to 'tvix/eval/src/value/string.rs') diff --git a/tvix/eval/src/value/string.rs b/tvix/eval/src/value/string.rs index 626cf398f2..122a82e048 100644 --- a/tvix/eval/src/value/string.rs +++ b/tvix/eval/src/value/string.rs @@ -11,6 +11,7 @@ enum StringRepr { Heap(String), } +#[repr(transparent)] #[derive(Clone, Debug)] pub struct NixString(StringRepr); -- cgit 1.4.1