lint idea: public Futures should be Send #5379
Labels
A-lint
Area: New lints
L-style
Lint: Belongs in the style lint group
T-async-await
Type: Issues related to async/await
One possible result of this discussion on Rust internals could be a lint that helps library maintainers in the large and the small (i.e. also between modules of the same crate) produce useful Future implementations when multithreaded executors are a possible runtime target. The lint would be disabled when targeting embedded systems where Futures are multiplexed onto the current thread only.
Informally specified, the rule would be that for any public function or method that returns an implementation of
Future
the return type must also beSend
.Is this feasible? Is this desirable?
The text was updated successfully, but these errors were encountered: