Skip to content

Permit unqualified references to associated types of the trait within the trait definition #18764

Closed
@emberian

Description

@emberian
#![feature(associated_types)]
pub trait Transfer {
    type Result;
    fn transfer(&mut self) -> Result;
}

fn main(){}

Gives the error:

foo.rs:4:31: 4:37 error: wrong number of type arguments: expected 2, found 0
foo.rs:4     fn transfer(&mut self) -> Result;
                                       ^~~~~~

According to the RFC the Result ought to refer to the associated type.

Metadata

Metadata

Assignees

Labels

A-associated-itemsArea: Associated items (types, constants & functions)

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions