diff --git a/src/lua.rs b/src/lua.rs index d5b6991..24544da 100644 --- a/src/lua.rs +++ b/src/lua.rs @@ -1319,7 +1319,7 @@ impl Lua { /// /// By default JIT is enabled. Changing this option does not have any effect on /// already loaded functions. - #[cfg(any(feature = "luau-jit", docsrs))] + #[cfg(any(feature = "luau-jit", doc))] #[cfg_attr(docsrs, doc(cfg(feature = "luau-jit")))] pub fn enable_jit(&self, enable: bool) { unsafe { (*self.extra.get()).enable_jit = enable }; diff --git a/src/types.rs b/src/types.rs index 534088a..7385b4a 100644 --- a/src/types.rs +++ b/src/types.rs @@ -99,7 +99,7 @@ impl MaybeSend for T {} #[derive(Debug, Default, Clone, Copy, PartialEq)] pub struct Vector(pub(crate) [f32; Self::SIZE]); -#[cfg(feature = "luau")] +#[cfg(any(feature = "luau", doc))] impl fmt::Display for Vector { #[rustfmt::skip] fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { @@ -110,7 +110,7 @@ impl fmt::Display for Vector { } } -#[cfg(feature = "luau")] +#[cfg(any(feature = "luau", doc))] impl Vector { pub(crate) const SIZE: usize = if cfg!(feature = "luau-vector4") { 4 } else { 3 }; @@ -168,7 +168,7 @@ impl Serialize for Vector { } } -#[cfg(feature = "luau")] +#[cfg(any(feature = "luau", doc))] impl PartialEq<[f32; Self::SIZE]> for Vector { #[inline] fn eq(&self, other: &[f32; Self::SIZE]) -> bool { diff --git a/src/util/short_names.rs b/src/util/short_names.rs index a50c2bf..55713ec 100644 --- a/src/util/short_names.rs +++ b/src/util/short_names.rs @@ -1,5 +1,6 @@ -//! Mostly copied from bevy_utils -//! https://github.com/bevyengine/bevy/blob/main/crates/bevy_utils/src/short_names.rs +//! Mostly copied from [bevy_utils] +//! +//! [bevy_utils]: https://github.com/bevyengine/bevy/blob/main/crates/bevy_utils/src/short_names.rs use std::any::type_name;