2020-08-13 15:26:55 -05:00
|
|
|
//@ [full] build-pass
|
|
|
|
//@ revisions: full min
|
2021-08-30 03:59:53 -05:00
|
|
|
#![cfg_attr(full, feature(adt_const_params))]
|
2020-08-13 15:26:55 -05:00
|
|
|
#![cfg_attr(full, allow(incomplete_features))]
|
|
|
|
|
2023-05-16 23:05:46 -05:00
|
|
|
#[cfg(full)]
|
|
|
|
use std::marker::ConstParamTy;
|
2020-08-13 15:26:55 -05:00
|
|
|
|
|
|
|
#[derive(PartialEq, Eq)]
|
2023-05-16 23:05:46 -05:00
|
|
|
#[cfg_attr(full, derive(ConstParamTy))]
|
2020-08-13 15:26:55 -05:00
|
|
|
struct Inner;
|
|
|
|
|
|
|
|
// Note: We emit the error 5 times if we don't deduplicate:
|
|
|
|
// - struct definition
|
|
|
|
// - impl PartialEq
|
|
|
|
// - impl Eq
|
|
|
|
// - impl StructuralPartialEq
|
|
|
|
#[derive(PartialEq, Eq)]
|
|
|
|
struct Outer<const I: Inner>;
|
2020-08-18 15:44:06 -05:00
|
|
|
//[min]~^ `Inner` is forbidden
|
|
|
|
//[min]~| `Inner` is forbidden
|
|
|
|
//[min]~| `Inner` is forbidden
|
|
|
|
//[min]~| `Inner` is forbidden
|
2020-08-13 15:26:55 -05:00
|
|
|
|
|
|
|
fn main() {}
|