Skip to content

Segfault with simple twiddle objects #5192

Closed
@brson

Description

@brson
pub trait EventLoop {
}

pub struct UvEventLoop {
    uvio: int
}

pub impl UvEventLoop {
    static fn new() -> UvEventLoop {
        UvEventLoop {
            uvio: 0
        }
    }
}

impl EventLoop for UvEventLoop {
}

pub struct Scheduler {
    event_loop: ~EventLoop,
}

pub impl Scheduler {

    static fn new(event_loop: ~EventLoop) -> Scheduler {
        Scheduler {
            event_loop: event_loop,
        }
    }
}

fn main() {
    let mut sched = Scheduler::new(~UvEventLoop::new() as ~EventLoop);
}

Blocks #4419

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions