about summary refs log tree commit diff
diff options
context:
space:
mode:
authorJubilee <workingjubilee@gmail.com>2024-10-29 03:11:45 -0700
committerGitHub <noreply@github.com>2024-10-29 03:11:45 -0700
commit096363626a9d05a26c47891961b3351ce49c6ce5 (patch)
tree6edab3ada2dbdfa7ae9c04068dfed2e068c23a57
parent9d5847576090548680c9f0aa710fd21875006ca3 (diff)
parent6c93c65057377d839d1f9d8ea172d898b6b6ce2d (diff)
downloadrust-096363626a9d05a26c47891961b3351ce49c6ce5.tar.gz
rust-096363626a9d05a26c47891961b3351ce49c6ce5.zip
Rollup merge of #132312 - jieyouxu:delete-crashes-23707, r=matthiaskrgr
Delete `tests/crashes/23707.rs` because it's flaky

It's conditioned on `only-x86_64` because it doesn't reliably fail on other platforms, it's optimization dependent and failed to ICE post-PGO in
<https://github.com/rust-lang/rust/pull/132300#issuecomment-2443279042>. Remove this test for now without prejudice against relanding the test in a more reliable form.

I removed the `S-bug-has-test` label from #23707.

r? compiler
-rw-r--r--tests/crashes/23707.rs109
1 files changed, 0 insertions, 109 deletions
diff --git a/tests/crashes/23707.rs b/tests/crashes/23707.rs
deleted file mode 100644
index 4105933c60f..00000000000
--- a/tests/crashes/23707.rs
+++ /dev/null
@@ -1,109 +0,0 @@
-//@ known-bug: #23707
-//@ compile-flags: -Copt-level=0 --edition=2021
-//@ only-x86_64
-#![recursion_limit="2048"]
-
-use std::marker::PhantomData;
-use std::fmt;
-use std::fmt::Debug;
-
-pub struct Z( () );
-pub struct S<T> (PhantomData<T>);
-
-
-pub trait Nat {
-    fn sing() -> Self;
-    fn get(&self) -> usize;
-}
-
-impl Nat for Z {
-    fn sing() -> Z { Z( () ) }
-    #[inline(always)]
-    fn get(&self) -> usize {
-        0
-    }
-}
-
-impl<T : Nat> Nat for S<T> {
-    fn sing() -> S<T> { S::<T>( PhantomData::<T> ) }
-    #[inline(always)]
-    fn get(&self) -> usize {
-        let prd : T = Nat::sing();
-        1 + prd.get()
-    }
-}
-
-pub type N0 = Z;
-pub type N1 = S<N0>;
-pub type N2 = S<N1>;
-pub type N3 = S<N2>;
-pub type N4 = S<N3>;
-pub type N5 = S<N4>;
-
-
-pub struct Node<D : Nat>(usize,PhantomData<D>);
-
-impl<D:Nat> Node<D> {
-    pub fn push(&self, c : usize) -> Node<S<D>> {
-        let Node(i,_) = *self;
-        Node(10*i+c, PhantomData::<S<D>>)
-    }
-}
-
-impl<D:Nat> Node<S<D>> {
-    pub fn pop(&self) -> (Node<D>,usize) {
-        let Node(i,_) = *self;
-        (Node(i/10, PhantomData::<D>), i-10*(i/10))
-    }
-}
-
-impl<D:Nat> Debug for Node<D> {
-    fn fmt(&self, f : &mut fmt::Formatter) -> fmt::Result {
-        let s : D = Nat::sing();
-        write!(f, "Node<{}>: i= {}",
-               s.get(), self.0)
-    }
-}
-pub trait Step {
-    fn step(&self, usize) -> Self;
-}
-
-impl Step for Node<N0> {
-    #[inline(always)]
-    fn step(&self, n : usize) -> Node<N0> {
-        println!("base case");
-        Node(n,PhantomData::<N0>)
-    }
-}
-
-impl<D:Nat> Step for Node<S<D>>
-    where Node<D> : Step {
-        #[inline(always)]
-        fn step(&self, n : usize) -> Node<S<D>> {
-            println!("rec");
-            let (par,c) = self.pop();
-            let cnew = c+n;
-            par.step(c).push(cnew)
-        }
-
-}
-
-fn tst<D:Nat>(ref p : &Node<D>, c : usize) -> usize
-    where Node<D> : Step {
-        let Node(i,_) = p.step(c);
-        i
-}
-
-
-
-fn main() {
-    let nd : Node<N3> = Node(555,PhantomData::<N3>);
-
-    // overflow...core::marker::Size
-    let Node(g,_) = tst(nd,1);
-
-    // ok
-    //let Node(g,_) = nd.step(1);
-
-    println!("{:?}", g);
-}