-
Notifications
You must be signed in to change notification settings - Fork 13.6k
Closed
Labels
E-easyCall for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.E-needs-testCall for participation: An issue has been fixed and does not reproduce, but no test has been added.Call for participation: An issue has been fixed and does not reproduce, but no test has been added.
Description
This compiles, but segfaults when run:
pub enum Thing {
A(~Foo)
}
pub trait Foo {}
pub struct Struct;
impl Foo for Struct {}
fn main() {
match A(~Struct as ~Foo) {
A(a) => 0,
};
}
The segfault goes away when you do the following:
- Convert
A(a) => 0
toA(_) => 0
- Change all the unique pointers to managed pointers
- Change the tag from
A(~Foo)
toA(~Struct)
(and remove the cast)
Metadata
Metadata
Assignees
Labels
E-easyCall for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.E-needs-testCall for participation: An issue has been fixed and does not reproduce, but no test has been added.Call for participation: An issue has been fixed and does not reproduce, but no test has been added.