aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbors[bot] <26634292+bors[bot]@users.noreply.github.com>2019-06-30 10:43:22 +0100
committerbors[bot] <26634292+bors[bot]@users.noreply.github.com>2019-06-30 10:43:22 +0100
commit950da94c3aaebb783d20be2552b6c1b77e92c7a0 (patch)
treef72dab64a69a1fe10dfe6e227853fd26a3cd8292
parent27df89f47d5f0a6e8e62d517d98dda854efabc34 (diff)
parent067ca38ecb737734404e9d778f76d116e00d955d (diff)
Merge #1460
1460: Consider unreachable code to be unnecessary in VSC r=matklad a=etaoins 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. Before: <img width="308" alt="Screen Shot 2019-06-30 at 12 08 56" src="https://user-images.githubusercontent.com/687534/60391416-133d5480-9b31-11e9-86fb-e252739ab3a8.png"> After: <img width="303" alt="Screen Shot 2019-06-30 at 12 16 49" src="https://user-images.githubusercontent.com/687534/60391418-19333580-9b31-11e9-9eea-850c62eb9a07.png"> Co-authored-by: Ryan Cumming <[email protected]>
-rw-r--r--editors/code/src/utils/diagnostics/rust.ts1
1 files changed, 1 insertions, 0 deletions
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 {
103 return [ 103 return [
104 'dead_code', 104 'dead_code',
105 'unknown_lints', 105 'unknown_lints',
106 'unreachable_code',
106 'unused_attributes', 107 'unused_attributes',
107 'unused_imports', 108 'unused_imports',
108 'unused_macros', 109 'unused_macros',