From 067ca38ecb737734404e9d778f76d116e00d955d Mon Sep 17 00:00:00 2001 From: Ryan Cumming Date: Sun, 30 Jun 2019 12:13:56 +1000 Subject: Consider unreachable code to be unnecessary in VSC This adds `unreachable_code` to the list of diagnostic codes we map to `Unnecessary` in Visual Studio Code. This is consistent with what the TypeScript language server does. --- editors/code/src/utils/diagnostics/rust.ts | 1 + 1 file changed, 1 insertion(+) (limited to 'editors/code/src') diff --git a/editors/code/src/utils/diagnostics/rust.ts b/editors/code/src/utils/diagnostics/rust.ts index d16576eb1..5e2d6b6ff 100644 --- a/editors/code/src/utils/diagnostics/rust.ts +++ b/editors/code/src/utils/diagnostics/rust.ts @@ -103,6 +103,7 @@ function isUnusedOrUnnecessary(rd: RustDiagnostic): boolean { return [ 'dead_code', 'unknown_lints', + 'unreachable_code', 'unused_attributes', 'unused_imports', 'unused_macros', -- cgit v1.2.3