-
-
Notifications
You must be signed in to change notification settings - Fork 15k
Deref coercions do not work with blocks #26978
Copy link
Copy link
Open
Labels
A-type-systemArea: Type systemArea: Type systemP-mediumMedium priorityMedium priorityT-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.T-typesRelevant to the types team, which will review and decide on the PR/issue.Relevant to the types team, which will review and decide on the PR/issue.
Description
Metadata
Metadata
Assignees
Labels
A-type-systemArea: Type systemArea: Type systemP-mediumMedium priorityMedium priorityT-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.T-typesRelevant to the types team, which will review and decide on the PR/issue.Relevant to the types team, which will review and decide on the PR/issue.
Type
Fields
Give feedbackNo fields configured for issues without a type.
It seems that the compiler handles a block differently when coercing a value.
RFC 401 says that a block with type
Uis also a target for coercion, so I think this behavior is a bug.Also, the compiler seems to be able to coerce blocks using some "trivial" rules (e.g.
&mut T->&T).So I guess this is more likely a problem of auto-deref.