You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
More specific errors for kind check failures #12201
Today if a type is not Send (or whatever) you get a rather terse error message informing you of that fact, but no clue as to why a type isn't send. It shouldn't be too hard to walk over the type, identifying a specific path that leads to a non-sendable type. (Same holds for linearity etc)
This was discussed some on IRC. To clarify the consensus, the basic strategy we had in mind is to:
Refactor TypeContents into a visitor that walks the, well, type contents.
TypeContents uses this visitor to compute its bitsets.
In the case of an error, a separate path of code uses the visitor to walk down and compute a "path" from the type to the smallest error case. Something like "this is not send because x.y.z is not sendable". This path probably has the same form as the paths that the borrow checker reports, though it may not use the same data structures.
The reason for this approach is that we do not want to compute nor store the full paths in the normal case, since TypeContents are computed for a LOT of types, and only a very few of them have errors.
Activity
nikomatsakis commentedon Feb 12, 2014
This was discussed some on IRC. To clarify the consensus, the basic strategy we had in mind is to:
x.y.zis not sendable". This path probably has the same form as the paths that the borrow checker reports, though it may not use the same data structures.The reason for this approach is that we do not want to compute nor store the full paths in the normal case, since TypeContents are computed for a LOT of types, and only a very few of them have errors.
nikomatsakis commentedon Jan 16, 2015
@flaper87 did this as part of the OIBIT work.
Auto merge of rust-lang#12201 - Veykril:inlay-hide, r=Veykril