Struct rust_examples::memory::DoubleFeeTest[][src]

pub struct DoubleFeeTest;
Expand description

This test shows that in safe Rust one cannot compile a code that would result in double free.

Example

struct Data;

let data = Data;

drop(data); // Free the memory once
drop(data); // Free the memory again

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.