-
-
Notifications
You must be signed in to change notification settings - Fork 14.2k
Closed
Labels
A-DSTsArea: Dynamically-sized types (DSTs)Area: Dynamically-sized types (DSTs)
Milestone
Description
In order not have a tonne of coherence errors, we currently do not unify unsized types with type variables in type inference. For example, [T] with U. This mimics our old behaviour where unsized types were not types.
This prevents us having an impl for &T which will use an impl for [T], i.e., we need a separate impl for &[T]. This is one of the primary benefits of DST. It also causes problems when the compiler needs to infer a DST for a type parameter, e.g., in function calls. See #17122 for one example.
Metadata
Metadata
Assignees
Labels
A-DSTsArea: Dynamically-sized types (DSTs)Area: Dynamically-sized types (DSTs)