about summary refs log tree commit diff
diff options
context:
space:
mode:
authorTavo Annus <tavo.annus@gmail.com>2024-02-25 21:45:31 +0200
committerTavo Annus <tavo.annus@gmail.com>2024-02-26 20:17:09 +0200
commita2bf15eede888e2b010a1ed94bd4895d7c66c809 (patch)
tree11f314b9f896617f2ad546e0177db96e700d4637
parentbe6f8e2648d99d8e858710460c89e9cf26685f00 (diff)
downloadrust-a2bf15eede888e2b010a1ed94bd4895d7c66c809.tar.gz
rust-a2bf15eede888e2b010a1ed94bd4895d7c66c809.zip
Filter out false positive errors
-rw-r--r--crates/rust-analyzer/src/cli/analysis_stats.rs7
1 files changed, 5 insertions, 2 deletions
diff --git a/crates/rust-analyzer/src/cli/analysis_stats.rs b/crates/rust-analyzer/src/cli/analysis_stats.rs
index ce7e3b3cd6a..186b65692ec 100644
--- a/crates/rust-analyzer/src/cli/analysis_stats.rs
+++ b/crates/rust-analyzer/src/cli/analysis_stats.rs
@@ -453,8 +453,11 @@ impl flags::AnalysisStats {
                                     err_idx += 7;
                                     let err_code = &err[err_idx..err_idx + 4];
                                     match err_code {
-                                        "0282" => continue,                              // Byproduct of testing method
-                                        "0277" if generated.contains(&todo) => continue, // See https://github.com/rust-lang/rust/issues/69882
+                                        "0282" | "0283" => continue, // Byproduct of testing method
+                                        "0277" | "0308" if generated.contains(&todo) => continue, // See https://github.com/rust-lang/rust/issues/69882
+                                        // FIXME: In some rare cases `AssocItem::container_or_implemented_trait` returns `None` for trait methods.
+                                        // Generated code is valid in case traits are imported
+                                        "0599" if err.contains("the following trait is implemented but not in scope") => continue,
                                         _ => (),
                                     }
                                     bar.println(err);