-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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
Fixes issue #11004 #35749
Fixes issue #11004 #35749
Conversation
Looks good. @bors r+ rollup |
📌 Commit 356615b has been approved by |
#[cfg(not(works))] | ||
unsafe fn access(n:*mut A) -> (i32, f64) { | ||
let x : i32 = n.x; //~ ERROR attempted access of field `x` | ||
//~| NOTE `A` is a native pointer; perhaps you need to deref with `(*A).x` |
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.
Surely A
isn't the native pointer, n
is. Also (*A).x
isn't a valid expression. I think this should be either "n
is a native pointer; perhaps you need to deref with (*n).x
" or "*mut A
is a native pointer; perhaps you need to deref with (*n).x
".
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.
@ollie27 - good catch. This is what I get for reviewing with a sleepy brain
@bors r- I missed that the wrong message was given. |
356615b
to
feeed0b
Compare
Updated. |
@bors r+ rollup |
📌 Commit feeed0b has been approved by |
…ndturner Fixes issue rust-lang#11004 Fixes rust-lang#11004. r? @jonathandturner
Fixes #11004.
r? @jonathandturner