Skip to content

Commit f4e6d38

Browse files
committed
Auto merge of #134608 - DianQK:disable-93775, r=<try>
Move test #93775 to crashes Closes #132111. Closes #133432. Re-opens #93775. I think this test case is flaky because the recursive calls happen to hit the upper limit of the call stack. IMO, this may not be an issue, as it's reasonable for overly complex code to require additional build configurations (such as increasing the call stack size). r? jieyouxu try-job: x86_64-msvc try-job: i686-msvc
2 parents 6076bee + 091613d commit f4e6d38

File tree

3 files changed

+37
-34
lines changed

3 files changed

+37
-34
lines changed

src/tools/tidy/src/issues.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,6 @@ ui/associated-consts/issue-58022.rs
4444
ui/associated-consts/issue-63496.rs
4545
ui/associated-consts/issue-69020-assoc-const-arith-overflow.rs
4646
ui/associated-consts/issue-88599-ref-self.rs
47-
ui/associated-consts/issue-93775.rs
4847
ui/associated-consts/issue-93835.rs
4948
ui/associated-inherent-types/issue-104260.rs
5049
ui/associated-inherent-types/issue-109071.rs
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
//! This test case is modified from <https://github.com/rust-lang/rust/issues/93775>.
2+
//! The type printing involves recursive calls that lead to stack overflow.
3+
//! If it no longer crashes, please increase the nested type levels
4+
//! unless you are fixing this issue.
5+
//@ known-bug: #93775
6+
7+
#![recursion_limit = "2049"]
8+
9+
use std::marker::PhantomData;
10+
11+
struct Z;
12+
struct S<T>(PhantomData<T>);
13+
14+
type Nested4<T> = S<S<S<S<T>>>>;
15+
type Nested16<T> = Nested4<Nested4<Nested4<Nested4<T>>>>;
16+
type Nested64<T> = Nested16<Nested16<Nested16<Nested16<T>>>>;
17+
type Nested256<T> = Nested64<Nested64<Nested64<Nested64<T>>>>;
18+
type Nested1024<T> = Nested256<Nested256<Nested256<Nested256<T>>>>;
19+
type Nested2048<T> = Nested1024<Nested1024<T>>;
20+
21+
type Nested = Nested2048<Z>;
22+
23+
trait AsNum {
24+
const NUM: u32;
25+
}
26+
27+
impl AsNum for Z {
28+
const NUM: u32 = 0;
29+
}
30+
31+
impl<T: AsNum> AsNum for S<T> {
32+
const NUM: u32 = T::NUM + 1;
33+
}
34+
35+
fn main() {
36+
let _ = Nested::NUM;
37+
}

tests/ui/associated-consts/issue-93775.rs

Lines changed: 0 additions & 33 deletions
This file was deleted.

0 commit comments

Comments
 (0)