Skip to main content

Module invalid_from_utf8

Module invalid_from_utf8 

Source

Re-exportsยง

use std::str::Utf8Error; ๐Ÿ”’
use rustc_ast::LitKind; ๐Ÿ”’
use rustc_hir::Expr; ๐Ÿ”’
use rustc_hir::ExprKind; ๐Ÿ”’
use rustc_lint_defs::declare_lint; ๐Ÿ”’
use rustc_lint_defs::declare_lint_pass; ๐Ÿ”’
use rustc_span::Spanned; ๐Ÿ”’
use rustc_span::sym; ๐Ÿ”’
use crate::diagnostics::InvalidFromUtf8Diag; ๐Ÿ”’
use crate::LateContext; ๐Ÿ”’
use crate::LateLintPass; ๐Ÿ”’
use crate::LintContext; ๐Ÿ”’

Structsยง

InvalidFromUtf8

Staticsยง

INVALID_FROM_UTF8
The invalid_from_utf8 lint checks for calls to std::str::from_utf8 and std::str::from_utf8_mut with a known invalid UTF-8 value.
INVALID_FROM_UTF8_UNCHECKED
The invalid_from_utf8_unchecked lint checks for calls to std::str::from_utf8_unchecked and std::str::from_utf8_unchecked_mut with a known invalid UTF-8 value.