mirror of
https://github.com/rust-lang/rust.git
synced 2025-04-28 02:57:37 +00:00
add tests
This commit is contained in:
parent
d5a0c5cfdb
commit
f0ae48d106
@ -1,33 +0,0 @@
|
||||
//@ known-bug: #133639
|
||||
|
||||
#![feature(with_negative_coherence)]
|
||||
#![feature(min_specialization)]
|
||||
#![feature(generic_const_exprs)]
|
||||
|
||||
#![crate_type = "lib"]
|
||||
use std::str::FromStr;
|
||||
|
||||
struct a<const b: bool>;
|
||||
|
||||
trait c {}
|
||||
|
||||
impl<const d: u32> FromStr for e<d>
|
||||
where
|
||||
a<{ d <= 2 }>: c,
|
||||
{
|
||||
type Err = ();
|
||||
fn from_str(f: &str) -> Result<Self, Self::Err> {
|
||||
unimplemented!()
|
||||
}
|
||||
}
|
||||
struct e<const d: u32>;
|
||||
|
||||
impl<const d: u32> FromStr for e<d>
|
||||
where
|
||||
a<{ d <= 2 }>: c,
|
||||
{
|
||||
type Err = ();
|
||||
fn from_str(f: &str) -> Result<Self, Self::Err> {
|
||||
unimplemented!()
|
||||
}
|
||||
}
|
@ -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 {}
|
@ -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
|
||||
|
@ -1,3 +1,6 @@
|
||||
//@ revisions: current next
|
||||
//@ ignore-compare-mode-next-solver (explicit revisions)
|
||||
//@[next] compile-flags: -Znext-solver
|
||||
//@ check-pass
|
||||
|
||||
// This caused a regression in a crater run in #132325.
|
||||
|
@ -1,3 +1,6 @@
|
||||
//@ revisions: current next
|
||||
//@ ignore-compare-mode-next-solver (explicit revisions)
|
||||
//@[next] compile-flags: -Znext-solver
|
||||
//@ check-pass
|
||||
|
||||
// A regression test for an edge case of candidate selection
|
||||
|
@ -1,3 +1,6 @@
|
||||
//@ revisions: current next
|
||||
//@ ignore-compare-mode-next-solver (explicit revisions)
|
||||
//@[next] compile-flags: -Znext-solver
|
||||
//@ check-pass
|
||||
|
||||
// A regression test for an edge case of candidate selection
|
||||
|
@ -1,3 +1,6 @@
|
||||
//@ revisions: current next
|
||||
//@ ignore-compare-mode-next-solver (explicit revisions)
|
||||
//@[next] compile-flags: -Znext-solver
|
||||
//@ check-pass
|
||||
|
||||
// A regression test for an edge case of candidate selection
|
||||
|
@ -1,3 +1,6 @@
|
||||
//@ revisions: current next
|
||||
//@ ignore-compare-mode-next-solver (explicit revisions)
|
||||
//@[next] compile-flags: -Znext-solver
|
||||
//@ check-pass
|
||||
|
||||
// A regression test for an edge case of candidate selection
|
||||
|
Loading…
Reference in New Issue
Block a user