Skip to content

Commit 5c923f0

Browse files
Remove redundant sorting of projection bounds in tyencode.
1 parent 5a881e9 commit 5c923f0

File tree

1 file changed

+1
-8
lines changed

1 file changed

+1
-8
lines changed

src/librustc_metadata/tyencode.rs

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -104,14 +104,7 @@ pub fn enc_ty<'a, 'tcx>(w: &mut Cursor<Vec<u8>>, cx: &ctxt<'a, 'tcx>, t: Ty<'tcx
104104

105105
enc_region(w, cx, obj.region_bound);
106106

107-
// Encode projection_bounds in a stable order
108-
let mut projection_bounds: Vec<_> = obj.projection_bounds
109-
.iter()
110-
.map(|b| (b.item_name().as_str(), b))
111-
.collect();
112-
projection_bounds.sort_by_key(|&(ref name, _)| name.clone());
113-
114-
for tp in projection_bounds.iter().map(|&(_, tp)| tp) {
107+
for tp in &obj.projection_bounds {
115108
write!(w, "P");
116109
enc_existential_projection(w, cx, &tp.0);
117110
}

0 commit comments

Comments
 (0)