Skip to content

ColorSpace is not deprecated correctly #99

Open
@RunDevelopment

Description

@RunDevelopment

ColorSpace is defined like this as of version 0.11.12:

#[doc(hidden)]
#[deprecated = "Renamed to `ColorModel`"]
pub use ColorModel as ColorSpace;

However, #[deprecated] does nothing on use declarations. See rust-lang/rust#30827 and rust-lang/rust#84584.

According to this SO answer, the current way to deprecate the old name of an exported item is to create a type alias. So I think the following should issue deprecation warnings to users:

#[doc(hidden)]
#[deprecated = "Renamed to `ColorModel`"]
pub type ColorSpace = crate::ColorModel;

Related: #[doc(hidden)] also doesn't seem to work, although that may be a Rust Analyzer issue.

Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions