diff --git a/src/ast/script_fn.rs b/src/ast/script_fn.rs index e42e1b8c..7126fdda 100644 --- a/src/ast/script_fn.rs +++ b/src/ast/script_fn.rs @@ -34,7 +34,7 @@ pub struct ScriptFnDef { /// /// Each line in non-block doc-comments starts with `///`. #[cfg(feature = "metadata")] - pub comments: Box<[crate::Identifier]>, + pub comments: Box<[crate::SmartString]>, } impl fmt::Display for ScriptFnDef { diff --git a/src/func/hashing.rs b/src/func/hashing.rs index b3e04613..ac0f1b27 100644 --- a/src/func/hashing.rs +++ b/src/func/hashing.rs @@ -27,7 +27,7 @@ impl Hasher for StraightHasher { fn finish(&self) -> u64 { self.0 } - #[inline(always)] + #[cold] fn write(&mut self, _bytes: &[u8]) { panic!("StraightHasher can only hash u64 values"); } diff --git a/src/module/mod.rs b/src/module/mod.rs index 962938ec..87b4f831 100644 --- a/src/module/mod.rs +++ b/src/module/mod.rs @@ -85,7 +85,7 @@ pub struct FuncInfoMetadata { pub return_type: Identifier, /// Comments. #[cfg(feature = "metadata")] - pub comments: Box<[Identifier]>, + pub comments: Box<[SmartString]>, } /// A type containing a single registered function.