File tree Expand file tree Collapse file tree 3 files changed +14
-1
lines changed Expand file tree Collapse file tree 3 files changed +14
-1
lines changed Original file line number Diff line number Diff line change @@ -17,6 +17,7 @@ impl ResultName for FailureReason {
17
17
FailureReason :: ICE => "ICE" . into ( ) ,
18
18
FailureReason :: CompilerError ( _) => "compiler error" . into ( ) ,
19
19
FailureReason :: DependsOn ( _) => "faulty deps" . into ( ) ,
20
+ FailureReason :: CompilerDiagnosticChange => "compiler diagnostic changed" . into ( ) ,
20
21
}
21
22
}
22
23
@@ -27,6 +28,7 @@ impl ResultName for FailureReason {
27
28
| FailureReason :: NetworkAccess
28
29
| FailureReason :: Timeout
29
30
| FailureReason :: OOM
31
+ | FailureReason :: CompilerDiagnosticChange
30
32
| FailureReason :: ICE => self . short_name ( ) ,
31
33
}
32
34
}
Original file line number Diff line number Diff line change @@ -199,6 +199,7 @@ pub enum FailureReason {
199
199
Timeout ,
200
200
ICE ,
201
201
NetworkAccess ,
202
+ CompilerDiagnosticChange ,
202
203
CompilerError ( BTreeSet < DiagnosticCode > ) ,
203
204
DependsOn ( BTreeSet < Crate > ) ,
204
205
}
@@ -230,6 +231,7 @@ impl ::std::fmt::Display for FailureReason {
230
231
. collect:: <Vec <String >>( )
231
232
. join( ", " ) ,
232
233
) ,
234
+ FailureReason :: CompilerDiagnosticChange => write ! ( f, "compiler-diagnostic-change" ) ,
233
235
}
234
236
}
235
237
}
@@ -274,7 +276,10 @@ impl ::std::str::FromStr for FailureReason {
274
276
impl FailureReason {
275
277
pub ( crate ) fn is_spurious ( & self ) -> bool {
276
278
match * self {
277
- FailureReason :: OOM | FailureReason :: Timeout | FailureReason :: NetworkAccess => true ,
279
+ FailureReason :: OOM
280
+ | FailureReason :: Timeout
281
+ | FailureReason :: NetworkAccess
282
+ | FailureReason :: CompilerDiagnosticChange => true ,
278
283
FailureReason :: CompilerError ( _)
279
284
| FailureReason :: DependsOn ( _)
280
285
| FailureReason :: Unknown
Original file line number Diff line number Diff line change @@ -110,6 +110,7 @@ fn run_cargo<DB: WriteResults>(
110
110
111
111
let mut did_ice = false ;
112
112
let mut did_network = false ;
113
+ let mut did_trybuild = false ;
113
114
let mut error_codes = BTreeSet :: new ( ) ;
114
115
let mut deps = BTreeSet :: new ( ) ;
115
116
@@ -123,6 +124,9 @@ fn run_cargo<DB: WriteResults>(
123
124
if line. contains ( "code: 111" ) && line. contains ( "Connection refused" ) {
124
125
did_network = true ;
125
126
}
127
+ if line. contains ( "the environment variable TRYBUILD=overwrite" ) {
128
+ did_trybuild = true ;
129
+ }
126
130
127
131
// Avoid trying to deserialize non JSON output
128
132
if !line. starts_with ( '{' ) {
@@ -198,6 +202,8 @@ fn run_cargo<DB: WriteResults>(
198
202
Err ( e. context ( FailureReason :: CompilerError ( error_codes) ) . into ( ) )
199
203
} else if did_network {
200
204
Err ( e. context ( FailureReason :: NetworkAccess ) . into ( ) )
205
+ } else if did_trybuild {
206
+ Err ( e. context ( FailureReason :: CompilerDiagnosticChange ) . into ( ) )
201
207
} else {
202
208
Err ( e. into ( ) )
203
209
}
You can’t perform that action at this time.
0 commit comments