It seems not quite ideal to rely on throwing a `pointer being freed was not allocated` malloc error to indicate the bug exists. I would suggest something like the following:

    #[unsafe_no_drop_flag]
    struct Foo {
        dropped: bool
    }

    impl Drop for Foo {
        fn drop(&mut self) {
            assert!(!self.dropped);
            self.dropped = true;
        }
    }

    pub fn main() {
        if true {
            let _a = Foo{ dropped: false };
        }

        if false {
            fail!();
        } else {
            let _a = Foo{ dropped: false };
        }
    }