Struct rustc_lint::unused::UnusedParens [−][src]
pub struct UnusedParens;
Implementations
fn check_unused_parens_pat(
&self,
cx: &EarlyContext<'_>,
value: &Pat,
avoid_or: bool,
avoid_mut: bool
)
Trait Implementations
fn check_poly_trait_ref(
&mut self,
_: &EarlyContext<'_>,
_: &PolyTraitRef,
_: &TraitBoundModifier
)
Due to ref
pattern, there can be a difference between using
{ expr }
and expr
in pattern-matching contexts. This means
that we should only lint unused_parens
and not unused_braces
in this case. Read more
fn check_unused_delims_expr(
&self,
cx: &EarlyContext<'_>,
value: &Expr,
ctx: UnusedDelimsCtx,
followed_by_block: bool,
left_pos: Option<BytePos>,
right_pos: Option<BytePos>
)
fn is_expr_delims_necessary(
inner: &Expr,
followed_by_block: bool,
followed_by_else: bool
) -> bool
fn emit_unused_delims_expr(
&self,
cx: &EarlyContext<'_>,
value: &Expr,
ctx: UnusedDelimsCtx,
left_pos: Option<BytePos>,
right_pos: Option<BytePos>
)
Auto Trait Implementations
impl RefUnwindSafe for UnusedParens
impl Send for UnusedParens
impl Sync for UnusedParens
impl Unpin for UnusedParens
impl UnwindSafe for UnusedParens
Blanket Implementations
Mutably borrows from an owned value. Read more
Layout
Note: Most layout information is completely unstable and may even differ between compilations. The only exception is types with certain repr(...)
attributes. Please see the Rust Reference’s “Type Layout” chapter for details on type layout guarantees.
Size: 0 bytes