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 |
src/librustc/diagnostics.rs
Outdated
There was a problem hiding this comment.
maybe this new line could have a trailing , to make it work better in diffs?
There was a problem hiding this comment.
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.
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