Skip to content

|&:| syntax should be obsolete #22881

Closed
Closed
@japaric

Description

@japaric

|:| and |&mut:| are obsolete, but |&:| is not.

fn main() {
    let a = |:| {};  //~ error: obsolete syntax: `:`, `&mut:`, or `&:`
    let b = |&:| {};  // accepted
    let c = |&mut :| {};  //~ error: obsolete syntax: `:`, `&mut:`, or `&:`
}
rustc 1.0.0-nightly (b47aebe3f 2015-02-26) (built 2015-02-27)

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-diagnosticsArea: Messages for errors, warnings, and lintsA-grammarArea: The grammar of Rust

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions