Today I browsed through article about 1.77.0 announcement and one thing caught my eye
C-string literals in Rust expand to a null-byte terminated string in memory of type & ‘static CStr. This makes it easier to write code that will interoperate with foreign language interfaces that require null-terminated strings. All relevant error-checking, such as for a missing interior null byte, is performed at compile time.
it is a reworded repetition from the official material:
This makes it easier to write code interoperating with foreign language interfaces which require nul-terminated strings, with all of the relevant error checking (e.g., lack of interior nul byte) performed at compile time.
Ok... For my eyes this is ether misworded "lack of terminating nul byte" (but user doesn't supply it in the literal anyway - so how coud this error be induced) or "illicit interior nul byte" (which might eventually be introduced by end-user with a simple\0 midst literal).
What's your opinion. Am I overreacting? Or I missed something not obvious?
I agree, "illicit" rather than "missing" is what it means. The official material is just about ok, it is checking there are no interior nul bytes, although "lack" is not the ideal word either, I think "absence" would be better.
Thank you @geebee22 & @quinedot , now I see the intent of the authors. Funny thing how non-English mother language influences how we perceive ambiguous English statements.
My understanding was exactly the opposite of intended: that examples in parentheses were of erroneous states checker vetoes, not correct states checker enforces.
I was thrown off-track especially by the word "missing" (which - at least for me - conveys desire of presence. I would never say the doctor checked me for missing Cov19...), which told me "there is no interior NUL, but there should be".
Not a native speaker either, but I'm pretty sure "missing" is wrong, or at least incredibly unidiomatic, here. "Error checking for a missing interior null byte" just can't reasonably be parsed to mean "error checking to ensure there are no interior null bytes".
By far the most likely explanation is that whoever did the copy editing/rewording misunderstood the original phrasing to mean the exact opposite to what it actually means.