Skip to content

Confusing warn-unused-mut warnings since 1.27.0-nightly 2018-04-29 #50343

Closed
@Robbepop

Description

@Robbepop

With the latest nightly (rustc 1.27.0-nightly (66363b288 2018-04-29)) I get confusing compile warnings about unused mut keywords where there are no mut keywords present.

The warnings do not happen on the previous nightly (rustc 1.27.0-nightly (66363b288 2018-04-28)) - so this might be a regression.

For further inspection the project where I receive those warnings can be found here.

Some examples

warning: variable does not need to be mutable
   --> src/ast/visitor.rs:158:56
    |
158 |     fn visit_cond(&mut self, _cond: &expr::IfThenElse, _: VisitEvent) {}
    |                                                        ^ help: remove this `mut`
    |
    = note: #[warn(unused_mut)] on by default
warning: variable does not need to be mutable
   --> src/simplifier/simplifications/normalizer.rs:100:17
    |
100 |           .all(|(lhs, rhs)| {
    |                 ------^^^^
    |                 |
    |                 help: remove this `mut`

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-NLLArea: Non-lexical lifetimes (NLL)A-lintsArea: Lints (warnings about flaws in source code) such as unused_mut.C-bugCategory: This is a bug.NLL-diagnosticsWorking towards the "diagnostic parity" goalT-compilerRelevant to the compiler team, which will review and decide on the PR/issue.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions