Skip to main content

Module if_let_rescope

Module if_let_rescope 

Source

Re-exportsยง

use std::iter::repeat_n; ๐Ÿ”’
use std::ops::ControlFlow; ๐Ÿ”’
use hir::intravisit; ๐Ÿ”’
use hir::intravisit::Visitor; ๐Ÿ”’
use rustc_ast::Recovered; ๐Ÿ”’
use rustc_errors::Applicability; ๐Ÿ”’
use rustc_errors::Diag; ๐Ÿ”’
use rustc_errors::Subdiagnostic; ๐Ÿ”’
use rustc_errors::SuggestionStyle; ๐Ÿ”’
use rustc_errors::msg; ๐Ÿ”’
use rustc_hir as hir; ๐Ÿ”’
use rustc_hir::HirIdSet; ๐Ÿ”’
use rustc_lint_defs::LintId; ๐Ÿ”’
use rustc_lint_defs::declare_lint; ๐Ÿ”’
use rustc_lint_defs::fcw; ๐Ÿ”’
use rustc_lint_defs::impl_lint_pass; ๐Ÿ”’
use rustc_macros::Diagnostic; ๐Ÿ”’
use rustc_macros::Subdiagnostic; ๐Ÿ”’
use rustc_middle::ty::adjustment::Adjust; ๐Ÿ”’
use rustc_middle::ty::significant_drop_order::extract_component_with_significant_dtor; ๐Ÿ”’
use rustc_middle::ty::significant_drop_order::ty_dtor_span; ๐Ÿ”’
use rustc_middle::ty; ๐Ÿ”’
use rustc_middle::ty::Ty; ๐Ÿ”’
use rustc_middle::ty::TyCtxt; ๐Ÿ”’
use rustc_span::DUMMY_SP; ๐Ÿ”’
use rustc_span::Span; ๐Ÿ”’
use smallvec::SmallVec; ๐Ÿ”’
use crate::LateContext; ๐Ÿ”’
use crate::LateLintPass; ๐Ÿ”’

Structsยง

AltHead ๐Ÿ”’
ClosingBrackets ๐Ÿ”’
ConsequentRewrite ๐Ÿ”’
DestructorLabel ๐Ÿ”’
FindSignificantDropper ๐Ÿ”’
IfLetRescope ๐Ÿ”’
Lint for potential change in program semantics of if lets
IfLetRescopeLint ๐Ÿ”’
IfLetRescopeRewrite ๐Ÿ”’

Enumsยง

SingleArmMatchBegin ๐Ÿ”’

Staticsยง

IF_LET_RESCOPE
The if_let_rescope lint detects cases where a temporary value with significant drop is generated on the right hand side of if let and suggests a rewrite into match when possible.

Functionsยง

expr_parent_is_else ๐Ÿ”’
expr_parent_is_stmt ๐Ÿ”’
match_head_needs_bracket ๐Ÿ”’