invalid_from_utf8[_unchecked]: also lint inherent methods

This commit is contained in:
Pavel Grigorenko 2025-02-16 00:40:25 +03:00
parent 4229b80f50
commit f53d0f502d
6 changed files with 269 additions and 43 deletions

View file

@ -439,11 +439,11 @@ lint_invalid_crate_type_value = invalid `crate_type` value
.suggestion = did you mean
# FIXME: we should ordinalize $valid_up_to when we add support for doing so
lint_invalid_from_utf8_checked = calls to `{$method}` with a invalid literal always return an error
lint_invalid_from_utf8_checked = calls to `{$method}` with an invalid literal always return an error
.label = the literal was valid UTF-8 up to the {$valid_up_to} bytes
# FIXME: we should ordinalize $valid_up_to when we add support for doing so
lint_invalid_from_utf8_unchecked = calls to `{$method}` with a invalid literal are undefined behavior
lint_invalid_from_utf8_unchecked = calls to `{$method}` with an invalid literal are undefined behavior
.label = the literal was valid UTF-8 up to the {$valid_up_to} bytes
lint_invalid_nan_comparisons_eq_ne = incorrect NaN comparison, NaN cannot be directly compared to itself