diff --git a/regex-automata/src/util/search.rs b/regex-automata/src/util/search.rs index ce30866b7..05b1cff54 100644 --- a/regex-automata/src/util/search.rs +++ b/regex-automata/src/util/search.rs @@ -110,7 +110,7 @@ impl<'h> Input<'h> { /// Create a new search configuration for the given haystack. #[inline] pub fn new>(haystack: &'h H) -> Input<'h> { - // Perform only one call to `haystack.as_ref()` to protect from malicious + // Perform only one call to `haystack.as_ref()` to protect from incorrect // implementations that return different values from multiple calls. // This is important because there's code that relies on `span` not being // out of bounds with respect to the stored `haystack`. @@ -1973,7 +1973,7 @@ mod tests { } #[test] - fn malicious_asref_guard() { + fn incorrect_asref_guard() { struct Bad(std::cell::Cell); impl AsRef<[u8]> for Bad {