mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-27 09:14:20 +00:00
add test cases for #9319
This commit is contained in:
parent
1a97d1460b
commit
dde2552b11
@ -153,7 +153,8 @@ pub enum MissingEqNonExhaustive3 {
|
||||
Bar,
|
||||
}
|
||||
|
||||
mod issue_9413 {
|
||||
mod struct_gen {
|
||||
// issue 9413
|
||||
pub trait Group {
|
||||
type Element: Eq + PartialEq;
|
||||
}
|
||||
@ -168,6 +169,14 @@ mod issue_9413 {
|
||||
|
||||
#[derive(PartialEq, Eq)]
|
||||
pub struct Bar<C: Suite>(i32, <C::Group as Group>::Element);
|
||||
|
||||
// issue 9319
|
||||
#[derive(PartialEq, Eq)]
|
||||
//~^ ERROR: you are deriving `PartialEq` and can implement `Eq`
|
||||
pub struct Oof<T: Fn()>(T);
|
||||
|
||||
#[derive(PartialEq, Eq)]
|
||||
pub struct Rab<T: Fn()>(T);
|
||||
}
|
||||
|
||||
fn main() {}
|
||||
|
@ -153,7 +153,8 @@ pub enum MissingEqNonExhaustive3 {
|
||||
Bar,
|
||||
}
|
||||
|
||||
mod issue_9413 {
|
||||
mod struct_gen {
|
||||
// issue 9413
|
||||
pub trait Group {
|
||||
type Element: Eq + PartialEq;
|
||||
}
|
||||
@ -168,6 +169,14 @@ mod issue_9413 {
|
||||
|
||||
#[derive(PartialEq, Eq)]
|
||||
pub struct Bar<C: Suite>(i32, <C::Group as Group>::Element);
|
||||
|
||||
// issue 9319
|
||||
#[derive(PartialEq)]
|
||||
//~^ ERROR: you are deriving `PartialEq` and can implement `Eq`
|
||||
pub struct Oof<T: Fn()>(T);
|
||||
|
||||
#[derive(PartialEq, Eq)]
|
||||
pub struct Rab<T: Fn()>(T);
|
||||
}
|
||||
|
||||
fn main() {}
|
||||
|
@ -68,10 +68,16 @@ LL | #[derive(PartialEq)]
|
||||
| ^^^^^^^^^ help: consider deriving `Eq` as well: `PartialEq, Eq`
|
||||
|
||||
error: you are deriving `PartialEq` and can implement `Eq`
|
||||
--> tests/ui/derive_partial_eq_without_eq.rs:165:14
|
||||
--> tests/ui/derive_partial_eq_without_eq.rs:166:14
|
||||
|
|
||||
LL | #[derive(PartialEq)]
|
||||
| ^^^^^^^^^ help: consider deriving `Eq` as well: `PartialEq, Eq`
|
||||
|
||||
error: aborting due to 12 previous errors
|
||||
error: you are deriving `PartialEq` and can implement `Eq`
|
||||
--> tests/ui/derive_partial_eq_without_eq.rs:174:14
|
||||
|
|
||||
LL | #[derive(PartialEq)]
|
||||
| ^^^^^^^^^ help: consider deriving `Eq` as well: `PartialEq, Eq`
|
||||
|
||||
error: aborting due to 13 previous errors
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user