diff options
| author | lcnr <rust@lcnr.de> | 2024-11-29 18:43:55 +0100 |
|---|---|---|
| committer | lcnr <rust@lcnr.de> | 2024-12-18 16:35:06 +0100 |
| commit | f0ae48d1065b6d017df75dc2d70a7c56b272b54d (patch) | |
| tree | f2797ed303a71d754730853d412e7a507ab4b359 /tests/ui/const-generics/generic_const_exprs | |
| parent | d5a0c5cfdbebc1366c8c801b3b7f9348f0197296 (diff) | |
| download | rust-f0ae48d1065b6d017df75dc2d70a7c56b272b54d.tar.gz rust-f0ae48d1065b6d017df75dc2d70a7c56b272b54d.zip | |
add tests
Diffstat (limited to 'tests/ui/const-generics/generic_const_exprs')
| -rw-r--r-- | tests/ui/const-generics/generic_const_exprs/specialization-fuzzing-ice-133639.rs | 19 | ||||
| -rw-r--r-- | tests/ui/const-generics/generic_const_exprs/specialization-fuzzing-ice-133639.stderr | 11 |
2 files changed, 30 insertions, 0 deletions
diff --git a/tests/ui/const-generics/generic_const_exprs/specialization-fuzzing-ice-133639.rs b/tests/ui/const-generics/generic_const_exprs/specialization-fuzzing-ice-133639.rs new file mode 100644 index 00000000000..d3ae863bee9 --- /dev/null +++ b/tests/ui/const-generics/generic_const_exprs/specialization-fuzzing-ice-133639.rs @@ -0,0 +1,19 @@ +//@ check-pass + +// Regression test for #133639. + +#![feature(with_negative_coherence)] +#![feature(min_specialization)] +#![feature(generic_const_exprs)] +//~^ WARNING the feature `generic_const_exprs` is incomplete + +#![crate_type = "lib"] +trait Trait {} +struct A<const B: bool>; + +trait C {} + +impl<const D: u32> Trait for E<D> where A<{ D <= 2 }>: C {} +struct E<const D: u32>; + +impl<const D: u32> Trait for E<D> where A<{ D <= 2 }>: C {} diff --git a/tests/ui/const-generics/generic_const_exprs/specialization-fuzzing-ice-133639.stderr b/tests/ui/const-generics/generic_const_exprs/specialization-fuzzing-ice-133639.stderr new file mode 100644 index 00000000000..f17b248d856 --- /dev/null +++ b/tests/ui/const-generics/generic_const_exprs/specialization-fuzzing-ice-133639.stderr @@ -0,0 +1,11 @@ +warning: the feature `generic_const_exprs` is incomplete and may not be safe to use and/or cause compiler crashes + --> $DIR/specialization-fuzzing-ice-133639.rs:7:12 + | +LL | #![feature(generic_const_exprs)] + | ^^^^^^^^^^^^^^^^^^^ + | + = note: see issue #76560 <https://github.com/rust-lang/rust/issues/76560> for more information + = note: `#[warn(incomplete_features)]` on by default + +warning: 1 warning emitted + |
