-
Notifications
You must be signed in to change notification settings - Fork 13.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ICE when returning struct with borrowed pointer to trait #5708
Comments
Reproduced as of 0252c30 -- nominating for milestone 5, production-ready |
@zargony found a simpler test: https://gist.github.com/zargony/1780399775004b28f0b4 Oddly this one works fine if you remove the type parameter. |
Here's another case that seems to trigger the same ICE. Both methods result in the ICE: Cannot relate bound region as subregion: br_self. Seems to be related to the type parameter, since everything compiles fine if you remove from MyTrait.
|
Ugh, I ran into this bug while trying to re-factor |
It would be very nice if this were fixed, not sure how to do what I'm doing without it. |
accepted for production-ready milestone |
I will try to take a look at this soon |
This appears to work now, flagging as needstest |
A function which takes a borrowed pointer to a trait and returns a struct with that borrowed pointer results in an ICE:
This is the resulting ICE:
This does not occur with concrete types, only with borrowed pointers to traits.
The text was updated successfully, but these errors were encountered: