Skip to content

Commit 950da94

Browse files
bors[bot]etaoins
andcommitted
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]>
2 parents 27df89f + 067ca38 commit 950da94

File tree

1 file changed

+1
-0
lines changed
  • editors/code/src/utils/diagnostics

1 file changed

+1
-0
lines changed

editors/code/src/utils/diagnostics/rust.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,7 @@ function isUnusedOrUnnecessary(rd: RustDiagnostic): boolean {
103103
return [
104104
'dead_code',
105105
'unknown_lints',
106+
'unreachable_code',
106107
'unused_attributes',
107108
'unused_imports',
108109
'unused_macros',

0 commit comments

Comments
 (0)