Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions tests/ui/const-generics/mgca/type-const-associated-default.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#![feature(min_generic_const_args)]

trait Trait {
#[type_const]
const N: usize = 10;
}

fn main(){
}
22 changes: 22 additions & 0 deletions tests/ui/const-generics/mgca/type-const-associated-default.stderr
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
error[E0658]: associated type defaults are unstable
--> $DIR/type-const-associated-default.rs:6:5
|
LL | const N: usize = 10;
| ^^^^^^^^^^^^^^^^^^^^
|
= note: see issue #29661 <https://github.com/rust-lang/rust/issues/29661> for more information
= help: add `#![feature(associated_type_defaults)]` to the crate attributes to enable
= note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date

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:2:12
|
LL | #![feature(min_generic_const_args)]
| ^^^^^^^^^^^^^^^^^^^^^^
|
= note: see issue #132980 <https://github.com/rust-lang/rust/issues/132980> for more information
= note: `#[warn(incomplete_features)]` on by default

error: aborting due to 1 previous error; 1 warning emitted

For more information about this error, try `rustc --explain E0658`.
Loading