Closed
Description
This example (correctly) fails to compile with "error[E0493]: destructors in statics are an unstable feature", but https://doc.rust-lang.org/error-index.html#E0493 is not found.
There is however some documentation in librustc_mir/diagnostics.rs:
E0493: r##"
A type with a destructor was assigned to an invalid type of variable. Erroneous
code example:
struct Foo {
a: u32
}
impl Drop for Foo {
fn drop(&mut self) {}
}
const F : Foo = Foo { a : 0 };
// error: constants are not allowed to have destructors
static S : Foo = Foo { a : 0 };
// error: destructors in statics are an unstable feature
To solve this issue, please use a type which does allow the usage of type with
destructors.
"##,
Metadata
Metadata
Assignees
Labels
No labels