diff --git a/tests/ui/const-generics/mgca/type-const-associated-default.rs b/tests/ui/const-generics/mgca/type-const-associated-default.rs new file mode 100644 index 0000000000000..74d29f779e58d --- /dev/null +++ b/tests/ui/const-generics/mgca/type-const-associated-default.rs @@ -0,0 +1,9 @@ +#![feature(min_generic_const_args)] + +trait Trait { + #[type_const] + const N: usize = 10; +} + +fn main(){ +} diff --git a/tests/ui/const-generics/mgca/type-const-associated-default.stderr b/tests/ui/const-generics/mgca/type-const-associated-default.stderr new file mode 100644 index 0000000000000..caed0cfcdbcf4 --- /dev/null +++ b/tests/ui/const-generics/mgca/type-const-associated-default.stderr @@ -0,0 +1,17 @@ +error: cannot find attribute `type_const` in this scope + --> $DIR/type-const-associated-default.rs:4:7 + | +LL | #[type_const] + | ^^^^^^^^^^ + +warning: the feature `min_generic_const_args` is incomplete and may not be safe to use and/or cause compiler crashes + --> $DIR/type-const-associated-default.rs:1:12 + | +LL | #![feature(min_generic_const_args)] + | ^^^^^^^^^^^^^^^^^^^^^^ + | + = note: see issue #132980 for more information + = note: `#[warn(incomplete_features)]` on by default + +error: aborting due to 1 previous error; 1 warning emitted +