File tree 1 file changed +6
-3
lines changed
src/tools/compiletest/src
1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -4258,7 +4258,9 @@ impl<'test> TestCx<'test> {
4258
4258
V0_BACK_REF_RE . replace_all ( & normalized, V0_BACK_REF_PLACEHOLDER ) . into_owned ( ) ;
4259
4259
}
4260
4260
4261
- // Normalize AllocId counter
4261
+ // AllocId are numbered globally in a compilation session. This can lead to changes
4262
+ // depending on the exact compilation flags and host architecture. Meanwhile, we want
4263
+ // to keep them numbered, to see if the same id appears multiple times.
4262
4264
{
4263
4265
use std:: fmt:: Write ;
4264
4266
@@ -4276,8 +4278,9 @@ impl<'test> TestCx<'test> {
4276
4278
// Complete with filler `─` to preserve the pretty-print.
4277
4279
if let Some ( tail) = caps. get ( 3 ) {
4278
4280
ret. push_str ( tail. as_str ( ) ) ;
4279
- let diff = caps. get ( 0 ) . unwrap ( ) . as_str ( ) . len ( ) - ret. len ( ) ;
4280
- for _ in 0 ..diff {
4281
+ let orig_len = caps. get ( 0 ) . unwrap ( ) . as_str ( ) . len ( ) ;
4282
+ let ret_len = ret. len ( ) ;
4283
+ for _ in orig_len..ret_len {
4281
4284
ret. push ( '─' ) ;
4282
4285
}
4283
4286
}
You can’t perform that action at this time.
0 commit comments