-
Notifications
You must be signed in to change notification settings - Fork 13.4k
Don't refer to 'this tail expression' in expansion. #142024
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
rustbot has assigned @petrochenkov. Use |
| --- ^^^^^^^^ | ||
| | | | ||
| | the trait `T` is not implemented for `()` | ||
| | this tail expression is of type `()` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remark: what's slightly amusing is that the Reference calls the tail expr of an block expr the "final operand"
The syntax for a block is [...] then an optional expression, called the final operand, and finally a }.
-- https://doc.rust-lang.org/reference/expressions/block-expr.html#r-expr.block.inner-attributes
nit: s/hase/has in the commit message and PR description |
r=me after #142024 (comment) is addressed and CI is green. |
The user has no clue what tail expression the compiler is talking about: it is an implementation detail of the macro that it uses a block with tail expression.
f19d2fe
to
da2e33b
Compare
@bors r=petrochenkov rollup |
Rollup of 11 pull requests Successful merges: - #141890 (Add link to correct documentation in htmldocck.py) - #141932 (Fix for async drop inside async gen fn) - #141960 (Use non-2015 edition paths in tests that do not test for their resolution) - #141968 (Run wfcheck in one big loop instead of per module) - #141969 (Triagebot: Remove `assign.users_on_vacation`) - #141985 (Ensure query keys are printed with reduced queries) - #141999 (Visit the ident in `PreciseCapturingNonLifetimeArg`.) - #142005 (Change `tag_field` to `FieldIdx` in `Variants::Multiple`) - #142017 (Fix incorrect use of "recommend" over "recommended") - #142024 (Don't refer to 'this tail expression' in expansion.) - #142025 (Don't refer to 'local binding' in extern macro.) r? `@ghost` `@rustbot` modify labels: rollup
Rollup merge of #142024 - m-ou-se:what-tail-expression, r=petrochenkov Don't refer to 'this tail expression' in expansion. The user has no clue what the compiler is talking about when it says "this tail expression". It is an implementation detail of the macro that it uses a block with tail expression.
The user has no clue what the compiler is talking about when it says "this tail expression". It is an implementation detail of the macro that it uses a block with tail expression.