From 0cfe1967854ce78a79ccac4904ff53c0ddb468cd Mon Sep 17 00:00:00 2001 From: fritzrehde Date: Fri, 24 Nov 2023 14:40:14 +0100 Subject: [PATCH] Added docstrings to RandomMteTag struct --- cranelift/wasm/src/state.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/cranelift/wasm/src/state.rs b/cranelift/wasm/src/state.rs index b966c61e2d29..58ddd4c779b5 100644 --- a/cranelift/wasm/src/state.rs +++ b/cranelift/wasm/src/state.rs @@ -282,8 +282,11 @@ static ALL_POSSIBLE_RANDOM_MTE_TAGS: Lazy<(usize, Vec)> = Lazy::new(|| { /// from `EXCLUDED_MTE_TAGS`. #[derive(Debug)] struct RandomMteTag { + /// The 4-bit random MTE tag. tag: u8, - // TODO: we could probably make this a u8 for efficieny as well, but vector.len() natively returns usize, so we use that for now + /// The index that was used to index into `ALL_POSSIBLE_RANDOM_MTE_TAGS` to + /// receive `tag`. This is stored here because it is needed to generate the + /// next random tag. index: usize, }