Skip to content

bindings_after_at: outer mutability annotation affects inner bindings #67926

Closed
@Centril

Description

@Centril

This compiles but should not.

#![feature(bindings_after_at)]

fn main() {
    let mut _is_mut @ _not_mut = 42;
    _not_mut = 0;
}

cc @matthewjasper @pnkfelix

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-bugCategory: This is a bug.F-bindings_after_at`#![feature(bindings_after_at)]`P-mediumMedium priorityT-compilerRelevant to the compiler team, which will review and decide on the PR/issue.requires-nightlyThis issue requires a nightly compiler in some way.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions