Skip to content

Commit

Permalink
ICE because uninhabited types and drop flags don't mix
Browse files Browse the repository at this point in the history
  • Loading branch information
Bruno Tavares committed Oct 24, 2015
1 parent 10e8088 commit 0bbe705
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/17987.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
enum Foo {}
impl Drop for Foo {
fn drop(&mut self) {}
}

fn main() {
unsafe { std::ptr::read(&1u8 as *const u8 as *const Foo) };
}

0 comments on commit 0bbe705

Please sign in to comment.