Skip to content

E0493 is missing from https://doc.rust-lang.org/error-index.html #42170

Closed
@glyn

Description

@glyn

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

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions