rust/tests/ui/const-generics/issues/issue-74950.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

28 lines
656 B
Rust
Raw Normal View History

// [full] build-pass
// revisions: full min
#![cfg_attr(full, feature(adt_const_params))]
#![cfg_attr(full, allow(incomplete_features))]
#[cfg(full)]
use std::marker::ConstParamTy;
#[derive(PartialEq, Eq)]
#[cfg_attr(full, derive(ConstParamTy))]
struct Inner;
// Note: We emit the error 5 times if we don't deduplicate:
// - struct definition
// - impl PartialEq
// - impl Eq
// - impl StructuralPartialEq
// - impl StructuralEq
#[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
//[min]~| `Inner` is forbidden
fn main() {}