Outdated eval_order_dependence documentation #7624
Labels
A-documentation
Area: Adding or improving documentation
good-first-issue
These issues are a good way to get started with Clippy
Lint name: eval_order_dependence
The documentation states:
Since the merging of Document execution order, is this not outdated advice? Sub-expression/ operand evaluation is now documented here.
Discussion
Take the following code, which is based on a heavily distilled macro expansion:
It fires off the warning:
unsequenced read of 'count'
/whether read occurs before this write depends on evaluation order
.Fair enough. The code looks messy and the evaluation order is something we need to consider. However if we then read the documentation:
We are left with the impression that we have potentially undefined behaviour and unsound code.
However, based on my understanding of the updated reference, the evaluation order is well defined. The code is sound.
Meta
The text was updated successfully, but these errors were encountered: