Skip to content

@trait, ~trait, and &trait should be supported #3157

Closed
@alexrp

Description

@alexrp

These forms are not currently supported. Example:

trait T {
}

struct S {
    f : f32;
}

impl of T for S {
}

fn main() {
    let s = @S { f : 100.0f32 };
    let t = s as @T;
}

This does not currently work (the compiler will complain that the cast is non-scalar).

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-lifetimesArea: Lifetimes / regionsA-type-systemArea: Type systemC-enhancementCategory: An issue proposing an enhancement or a PR with one.

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions