-
Notifications
You must be signed in to change notification settings - Fork 13.9k
Closed
Labels
A-testsuiteArea: The testsuite used to check the correctness of rustcArea: The testsuite used to check the correctness of rustcC-cleanupCategory: PRs that clean code up or issues documenting cleanup.Category: PRs that clean code up or issues documenting cleanup.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.
Description
Suggestion (not for this PR): #2735 refers to
"let _ = foo();"is differently effectful from just"foo();"This test (
tests/ui/drop/issue-2735-2.rs) exercisinglet _ = <expr>;vs<expr>;drop order does not need to allownon_camel_case_types, just changedeferstruct to use the canonical name, this is needlessly confusing:
- In the struct decl,
defer-the-structis in type namespace,defer-the-struct-constructor is in value namespace- In this function decl,
defer(fn) is in the value namespace,defer<'_>is in the type namespace- In the usage in
main,deferis the value namespace struct constructorSame for
tests/ui/drop/issue-2735-3.rstests/ui/drop/issue-979.rs
Originally posted by @jieyouxu in #138677 (comment)
Metadata
Metadata
Assignees
Labels
A-testsuiteArea: The testsuite used to check the correctness of rustcArea: The testsuite used to check the correctness of rustcC-cleanupCategory: PRs that clean code up or issues documenting cleanup.Category: PRs that clean code up or issues documenting cleanup.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.