Skip to content

Commit 08f033b

Browse files
committed
Sort trait bounds.
Closes #6334
1 parent d30776e commit 08f033b

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

src/librustc/middle/typeck/collect.rs

+2-1
Original file line numberDiff line numberDiff line change
@@ -1218,6 +1218,8 @@ fn ty_generics(ccx: &CrateCtxt,
12181218

12191219
check_bounds_compatible(ccx.tcx, &param_bounds, ident, span);
12201220

1221+
param_bounds.trait_bounds.sort_by(|a,b| a.def_id.cmp(&b.def_id));
1222+
12211223
param_bounds
12221224
}
12231225

@@ -1340,4 +1342,3 @@ fn check_method_self_type<RS:RegionScope>(
13401342
_ => {}
13411343
}
13421344
}
1343-

src/test/run-pass/issue-6334.rs

-2
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,6 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11-
// ignore-test
12-
1311
// Tests that everything still compiles and runs fine even when
1412
// we reorder the bounds.
1513

0 commit comments

Comments
 (0)