From 68695a6e06d2a1b1e246b076d57e46159c622a12 Mon Sep 17 00:00:00 2001 From: aerooneqq Date: Mon, 25 May 2026 08:40:34 +0300 Subject: [PATCH] Sort unexpected and unimportant errors --- src/tools/compiletest/src/runtest.rs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/tools/compiletest/src/runtest.rs b/src/tools/compiletest/src/runtest.rs index a2bf6c0839df..72817ad64521 100644 --- a/src/tools/compiletest/src/runtest.rs +++ b/src/tools/compiletest/src/runtest.rs @@ -745,6 +745,11 @@ fn check_expected_errors(&self, proc_res: &ProcRes) { } } + unexpected.sort_by_key(|e| (e.line_num, e.column_num)); + unimportant.sort_by_key(|e| (e.line_num, e.column_num)); + + // `not_found` are sorted because `expected_errors` are sorted as they are read from file + // line by line. let mut not_found = Vec::new(); // anything not yet found is a problem for (index, expected_error) in expected_errors.iter().enumerate() {