-
Notifications
You must be signed in to change notification settings - Fork 13.6k
Closed
Closed
Copy link
Labels
A-lintsArea: Lints (warnings about flaws in source code) such as unused_mut.Area: Lints (warnings about flaws in source code) such as unused_mut.A-macrosArea: All kinds of macros (custom derive, macro_rules!, proc macros, ..)Area: All kinds of macros (custom derive, macro_rules!, proc macros, ..)C-bugCategory: This is a bug.Category: This is a bug.
Description
#[derive(Debug)]
#[deprecated(since = "0.1.1", note = "oh noes")]
pub struct A;
#[derive(PartialOrd)]
#[deprecated(since = "0.1.1", note = "oh noes")]
pub struct B;
fn main() {}
Errors:
Compiling playground v0.0.1 (/playground)
warning: use of deprecated item 'A': oh noes
|
= note: #[warn(deprecated)] on by default
warning: use of deprecated item 'B': oh noes
error[E0277]: can't compare `B` with `B`
--> src/main.rs:6:10
|
6 | #[derive(PartialOrd)]
| ^^^^^^^^^^ no implementation for `B == B`
|
= help: the trait `std::cmp::PartialEq` is not implemented for `B`
error: aborting due to previous error
An easy fix might be to #[allow(deprecated)]
in the custom derive implementations provided by Rust. Right now one has to manually #[allow(deprecated)]
on all deprecated structs with derives, which is a pain, and also on all their impls...
Metadata
Metadata
Assignees
Labels
A-lintsArea: Lints (warnings about flaws in source code) such as unused_mut.Area: Lints (warnings about flaws in source code) such as unused_mut.A-macrosArea: All kinds of macros (custom derive, macro_rules!, proc macros, ..)Area: All kinds of macros (custom derive, macro_rules!, proc macros, ..)C-bugCategory: This is a bug.Category: This is a bug.