Don't refer to 'this tail expression' in expansion.#142024
Merged
bors merged 1 commit intorust-lang:masterfrom Jun 5, 2025
Merged
Don't refer to 'this tail expression' in expansion.#142024bors merged 1 commit intorust-lang:masterfrom
bors merged 1 commit intorust-lang:masterfrom
Conversation
Collaborator
|
rustbot has assigned @petrochenkov. Use |
jieyouxu
reviewed
Jun 4, 2025
Comment on lines
-5
to
-8
| | --- ^^^^^^^^ | ||
| | | | | ||
| | | the trait `T` is not implemented for `()` | ||
| | | this tail expression is of type `()` |
Member
There was a problem hiding this comment.
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
Member
|
nit: s/hase/has in the commit message and PR description |
Contributor
|
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
Member
Author
|
@bors r=petrochenkov rollup |
Collaborator
bors
added a commit
that referenced
this pull request
Jun 5, 2025
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
rust-timer
added a commit
that referenced
this pull request
Jun 5, 2025
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.
christian-schilling
pushed a commit
to christian-schilling/rustc_codegen_cranelift
that referenced
this pull request
Jan 27, 2026
Rollup of 11 pull requests Successful merges: - rust-lang/rust#141890 (Add link to correct documentation in htmldocck.py) - rust-lang/rust#141932 (Fix for async drop inside async gen fn) - rust-lang/rust#141960 (Use non-2015 edition paths in tests that do not test for their resolution) - rust-lang/rust#141968 (Run wfcheck in one big loop instead of per module) - rust-lang/rust#141969 (Triagebot: Remove `assign.users_on_vacation`) - rust-lang/rust#141985 (Ensure query keys are printed with reduced queries) - rust-lang/rust#141999 (Visit the ident in `PreciseCapturingNonLifetimeArg`.) - rust-lang/rust#142005 (Change `tag_field` to `FieldIdx` in `Variants::Multiple`) - rust-lang/rust#142017 (Fix incorrect use of "recommend" over "recommended") - rust-lang/rust#142024 (Don't refer to 'this tail expression' in expansion.) - rust-lang/rust#142025 (Don't refer to 'local binding' in extern macro.) r? `@ghost` `@rustbot` modify labels: rollup
christian-schilling
pushed a commit
to christian-schilling/rustc_codegen_cranelift
that referenced
this pull request
Jan 27, 2026
Rollup of 11 pull requests Successful merges: - rust-lang/rust#141890 (Add link to correct documentation in htmldocck.py) - rust-lang/rust#141932 (Fix for async drop inside async gen fn) - rust-lang/rust#141960 (Use non-2015 edition paths in tests that do not test for their resolution) - rust-lang/rust#141968 (Run wfcheck in one big loop instead of per module) - rust-lang/rust#141969 (Triagebot: Remove `assign.users_on_vacation`) - rust-lang/rust#141985 (Ensure query keys are printed with reduced queries) - rust-lang/rust#141999 (Visit the ident in `PreciseCapturingNonLifetimeArg`.) - rust-lang/rust#142005 (Change `tag_field` to `FieldIdx` in `Variants::Multiple`) - rust-lang/rust#142017 (Fix incorrect use of "recommend" over "recommended") - rust-lang/rust#142024 (Don't refer to 'this tail expression' in expansion.) - rust-lang/rust#142025 (Don't refer to 'local binding' in extern macro.) r? `@ghost` `@rustbot` modify labels: rollup
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.