# editor: Extract Diagnostics code out of \`editor.rs\` \(\#55747\) · gitcafe/zed

[View on GitCafe](https://git.cafe/gitcafe/zed/commit/1da60a8518d5f94304264a17870e34df4de70b50)

Repository: [gitcafe/zed](https://git.cafe/gitcafe/zed)

Visibility: public

Requested revision: 1da60a8518d5f94304264a17870e34df4de70b50

Requested commit: 1da60a8518d5f94304264a17870e34df4de70b50

Commit: 1da60a8518d5f94304264a17870e34df4de70b50

Tree: 21f299e535c06296349e2a65ecb6f89646016cd4

Author: Mikhail Pertsev

Committer: GitHub

## Message

```
editor: Extract Diagnostics code out of `editor.rs` (#55747)

cc @SomeoneToIgnore

## Summary

Follow-up to https://github.com/zed-industries/zed/discussions/55352,
where the conclusion was to split `editor.rs` incrementally by topic
instead of all at once.

This mechanically extracts diagnostics-related editor code into
`crates/editor/src/editor/diagnostics.rs` while preserving the existing
public API via re-exports.

## Testing

- `cargo check -p editor --lib`
- `cargo check -p diagnostics --lib`
- `cargo check -p diagnostics --tests`

Self-Review Checklist:

- [x] I've reviewed my own diff for quality, security, and reliability
- [x] Unsafe blocks (if any) have justifying comments
- [x] The content is consistent with the [UI/UX
checklist](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist)
- [x] Tests cover the new/changed behavior
- [x] Performance impact has been considered and is acceptable

Release Notes:

- N/A
```

## Parents

- [358d88d02f0176217281e80744807b89e2ad674c](https://git.cafe/gitcafe/zed/commit/358d88d02f0176217281e80744807b89e2ad674c?format=markdown)

[Source at this commit](https://git.cafe/gitcafe/zed/tree/1da60a8518d5f94304264a17870e34df4de70b50?format=markdown)
