-
-
Notifications
You must be signed in to change notification settings - Fork 17.8k
<Box<T> as Deref>::Target is not equivalent to T in this case. #76956
Copy link
Copy link
Closed
Labels
A-associated-itemsArea: Associated items (types, constants & functions)Area: Associated items (types, constants & functions)C-bugCategory: This is a bug.Category: This is a bug.E-needs-testCall for participation: An issue has been fixed and does not reproduce, but no test has been added.Call for participation: An issue has been fixed and does not reproduce, but no test has been added.
Description
Activity
Metadata
Metadata
Assignees
Labels
A-associated-itemsArea: Associated items (types, constants & functions)Area: Associated items (types, constants & functions)C-bugCategory: This is a bug.Category: This is a bug.E-needs-testCall for participation: An issue has been fixed and does not reproduce, but no test has been added.Call for participation: An issue has been fixed and does not reproduce, but no test has been added.
This code compiles correctly:
However, this code does not:
The only change was effectively replacing
Twith<Box<T> as Deref>::Target. My understanding is that these are supposed to be equivalent as it is defined that way in the standard library. The exact compile error is as follows:Meta
The error also occurs on the Nightly compiler.