-
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
DST raw pointers - *-pointers are fat pointers #16805
Conversation
I will review, I'd like to get more familiar with this code. |
@nikomatsakis r? updated to fix coercion fn calls |
@@ -167,5 +167,6 @@ register_diagnostics!( | |||
E0155, | |||
E0156, | |||
E0157, | |||
E0158 | |||
E0158, | |||
E0159 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe this new line could have a trailing ,
to make it work better in diffs?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think it can because our macro_rules
does not allow for optional trailing commas. Or at least, you do not get them automatically with $(...),*
, and I do not know if you can express them otherwise. The last time I tried to emulate the effect in macro_rules!
i was not successful.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, this felt so much like an enum definition that didn't even cross my mind.
I guess we could have a compulsory trailing comma via $(... , )*. Also, [
vec!`](http://doc.rust-lang.org/master/std/macro.vec!.html) somehow manages to satisfy the compiler to make optional trailing commas work.
Anyway, not important.
It occurs to me that we should not in fact allow implicit coercions where don't allow the corresponding implicit derefs for unsafe pointers. E.g.,
The second line here should be an error. I believe combining the two statements is OK:
Since we derefing a borrowed pointer, unsizing, then making an unsafe reference. I'll remove the ability to do the bogus adjustments on Monday. |
On Fri, Aug 29, 2014 at 01:39:48AM -0700, Nick Cameron wrote:
I agree that we should be consistent, although I think we should
In a separate PR? |
r+ modulo nits |
Addressed reviewer comments |
feat: Implement resolving and lowering of Lifetimes (no inference yet)
r? @pnkfelix or @nikomatsakis