Skip to content

Segfault after implicit conversion to ~Trait #11625

@whatisaphone

Description

@whatisaphone
//given this function...
fn func(t: ~Trait) {}

fn main() {
    // this causes some sort of memory unsafety
    func(~Struct {...});
    // and this doesn't
    func(~Struct {...} as ~Trait);
}

Full test case at https://gist.github.com/johnsoft/8482878

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