From 6849dc40bd7c7323177894f2715ebeb7616d5a88 Mon Sep 17 00:00:00 2001 From: CohenArthur Date: Mon, 31 Aug 2020 10:40:24 +0200 Subject: [PATCH] Fix typo in generated documentation for `entity!` (#2176) * entity: Fix typo in generated documentation The same function documentation was used for `from_u32()` and `as_u32()` while their behaviour is different --- cranelift/entity/src/lib.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cranelift/entity/src/lib.rs b/cranelift/entity/src/lib.rs index 4adf4a42cc..241c03c7ed 100644 --- a/cranelift/entity/src/lib.rs +++ b/cranelift/entity/src/lib.rs @@ -92,7 +92,7 @@ macro_rules! entity_impl { } impl $entity { - /// Return the underlying index value as a `u32`. + /// Create a new instance from a `u32`. #[allow(dead_code)] pub fn from_u32(x: u32) -> Self { debug_assert!(x < $crate::__core::u32::MAX);