File tree Expand file tree Collapse file tree 4 files changed +40
-36
lines changed Expand file tree Collapse file tree 4 files changed +40
-36
lines changed Original file line number Diff line number Diff line change @@ -578,10 +578,10 @@ impl TestProps {
578
578
// we don't want to pollute anything with backtrace-files
579
579
// also turn off backtraces in order to save some execution
580
580
// time on the tests; we only need to know IF it crashes
581
- self . rustc_env = vec ! [
581
+ self . rustc_env . extend ( [
582
582
( "RUST_BACKTRACE" . to_string ( ) , "0" . to_string ( ) ) ,
583
583
( "RUSTC_ICE" . to_string ( ) , "0" . to_string ( ) ) ,
584
- ] ;
584
+ ] ) ;
585
585
}
586
586
587
587
for key in & [ "RUST_TEST_NOCAPTURE" , "RUST_TEST_THREADS" ] {
Original file line number Diff line number Diff line change @@ -44,7 +44,6 @@ ui/associated-consts/issue-58022.rs
44
44
ui/associated-consts/issue-63496.rs
45
45
ui/associated-consts/issue-69020-assoc-const-arith-overflow.rs
46
46
ui/associated-consts/issue-88599-ref-self.rs
47
- ui/associated-consts/issue-93775.rs
48
47
ui/associated-consts/issue-93835.rs
49
48
ui/associated-inherent-types/issue-104260.rs
50
49
ui/associated-inherent-types/issue-109071.rs
Original file line number Diff line number Diff line change
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
+ //@ rustc-env:RUST_MIN_STACK=8388608
7
+
8
+ #![ recursion_limit = "2049" ]
9
+
10
+ use std:: marker:: PhantomData ;
11
+
12
+ struct Z ;
13
+ struct S < T > ( PhantomData < T > ) ;
14
+
15
+ type Nested4 < T > = S < S < S < S < T > > > > ;
16
+ type Nested16 < T > = Nested4 < Nested4 < Nested4 < Nested4 < T > > > > ;
17
+ type Nested64 < T > = Nested16 < Nested16 < Nested16 < Nested16 < T > > > > ;
18
+ type Nested256 < T > = Nested64 < Nested64 < Nested64 < Nested64 < T > > > > ;
19
+ type Nested1024 < T > = Nested256 < Nested256 < Nested256 < Nested256 < T > > > > ;
20
+ type Nested2048 < T > = Nested1024 < Nested1024 < T > > ;
21
+
22
+ type Nested = Nested2048 < Z > ;
23
+
24
+ trait AsNum {
25
+ const NUM : u32 ;
26
+ }
27
+
28
+ impl AsNum for Z {
29
+ const NUM : u32 = 0 ;
30
+ }
31
+
32
+ impl < T : AsNum > AsNum for S < T > {
33
+ const NUM : u32 = T :: NUM + 1 ;
34
+ }
35
+
36
+ fn main ( ) {
37
+ let _ = Nested :: NUM ;
38
+ }
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments