Adds a dylint library under tooling/lints that flags Zed-specific anti-patterns: * shared_string_from_str_literal, * async_block_without_await, * entity_update_in_render, * notify_in_render, * owned_string_into_shared, * len_in_loop_condition, and * blocking_io_on_foreground. Includes UI tests, a single-lint helper, and workspace.metadata.dylint registration so cargo dylint --all discovers it. The library pins its own nightly toolchain (kept out of the main workspace) and tracks dylint 6. Release Notes: - N/A Self-Review Checklist: - [ ] I've reviewed my own diff for quality, security, and reliability - [ ] Unsafe blocks (if any) have justifying comments - [ ] The content is consistent with the [UI/UX checklist](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist) - [ ] Tests cover the new/changed behavior - [ ] Performance impact has been considered and is acceptable Closes #ISSUE Release Notes: - N/A or Added/Fixed/Improved ...
57 lines
1.7 KiB
Plaintext
57 lines
1.7 KiB
Plaintext
error: this `async` block contains no `.await`
|
|
--> $DIR/async_block_without_await.rs:17:14
|
|
|
|
|
LL | let _f = async {};
|
|
| ^^^^^^^^
|
|
|
|
|
= help: consider removing the `async` block or adding the missing `.await`
|
|
= note: `-D async-block-without-await` implied by `-D warnings`
|
|
= help: to override `-D warnings` add `#[allow(async_block_without_await)]`
|
|
|
|
error: this `async` block contains no `.await`
|
|
--> $DIR/async_block_without_await.rs:20:14
|
|
|
|
|
LL | let _f = async { 42 };
|
|
| ^^^^^^^^^^^^
|
|
|
|
|
= help: consider removing the `async` block or adding the missing `.await`
|
|
|
|
error: this `async` block contains no `.await`
|
|
--> $DIR/async_block_without_await.rs:23:14
|
|
|
|
|
LL | let _f = async move {
|
|
| ______________^
|
|
LL | | let x = 1;
|
|
LL | | x + 2
|
|
LL | | };
|
|
| |_____^
|
|
|
|
|
= help: consider removing the `async` block or adding the missing `.await`
|
|
|
|
error: this `async` block contains no `.await`
|
|
--> $DIR/async_block_without_await.rs:29:14
|
|
|
|
|
LL | let _f = async { sync_fn() };
|
|
| ^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
= help: consider removing the `async` block or adding the missing `.await`
|
|
|
|
error: this `async` block contains no `.await`
|
|
--> $DIR/async_block_without_await.rs:34:21
|
|
|
|
|
LL | let inner = async { 42 };
|
|
| ^^^^^^^^^^^^
|
|
|
|
|
= help: consider removing the `async` block or adding the missing `.await`
|
|
|
|
error: this `async` block contains no `.await`
|
|
--> $DIR/async_block_without_await.rs:77:9
|
|
|
|
|
LL | async { 42 }
|
|
| ^^^^^^^^^^^^
|
|
|
|
|
= help: consider removing the `async` block or adding the missing `.await`
|
|
|
|
error: aborting due to 6 previous errors
|
|
|