Skip to content

Associated types are *not* Sized when used in the return type of default methods #20009

@japaric

Description

@japaric

STR

#![feature(associated_types)]

trait Trait {
    type Output;

    // Here `Output` is `Sized`
    fn is(&self) -> Self::Output;
    // But, here it seems that `Output` it's no longer `Sized`
    fn isnt(&self) -> Self::Output {}
    //~^ error: the trait `core::kinds::Sized` is not implemented for the type `Output`
}

fn main() {}

Version

rustc 0.13.0-nightly (2a231594c 2014-12-18 12:21:57 +0000)

cc @nikomatsakis @nick29581

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions