From b36261a3024e0fdded30277a4d0512f35d4d6251 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matthias=20Kr=C3=BCger?= Date: Sat, 2 Mar 2024 19:15:31 +0100 Subject: [PATCH] change ice msg weight a bit --- src/main.rs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/main.rs b/src/main.rs index 765498f..0c13528 100644 --- a/src/main.rs +++ b/src/main.rs @@ -2146,12 +2146,15 @@ fn find_ICE_string( } else { line }}) - // get the lonest ICE line + // get the lonest ICE line, assuming more text == more information == more interesting .max_by_key(|line| { // EXCEPTION: "error: internal compiler error: no errors encountered even though `delay_span_bug` issued" is usually longer than the actual ice line, so artifically decrease weight for this case if delay_span_bug_regex.is_match(line) { "internal compiler error".len() - } else { + } else if line.contains("internal compiler error") { + // artificially increase weight?? + line.len() + 20 + }else { line.len() } }