Skip to content

Qualified associated type in generic parameter needs a space separating the << #17362

Closed
@japaric

Description

@japaric

STR

#![feature(associated_types)]

trait Trait {
    type Type;

    // OK
    fn method() -> <Self as Trait>::Type;
    // Can't parse
    fn method() -> Box<<Self as Trait>::Type>;
}

fn main() {}

Output

ai.rs:9:23: 9:25 error: expected `;` or `{`, found `<<`
ai.rs:9     fn method() -> Box<<Self as Trait>::Type>;

Version

rustc 0.12.0-pre (9508faa22 2014-09-17 23:45:36 +0000)

cc @pcwalton

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-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