Skip to content

Commit 898d2c1

Browse files
committed
remove duplicated calls to sort_string
1 parent 19c5376 commit 898d2c1

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

compiler/rustc_middle/src/ty/error.rs

+2-6
Original file line numberDiff line numberDiff line change
@@ -151,12 +151,8 @@ impl<'tcx> TypeError<'tcx> {
151151
.into(),
152152
RegionsPlaceholderMismatch => "one type is more general than the other".into(),
153153
ArgumentSorts(values, _) | Sorts(values) => {
154-
let mut expected = values.expected.sort_string(tcx);
155-
let mut found = values.found.sort_string(tcx);
156-
if expected == found {
157-
expected = values.expected.sort_string(tcx);
158-
found = values.found.sort_string(tcx);
159-
}
154+
let expected = values.expected.sort_string(tcx);
155+
let found = values.found.sort_string(tcx);
160156
report_maybe_different(&expected, &found).into()
161157
}
162158
Traits(values) => {

0 commit comments

Comments
 (0)