-
Notifications
You must be signed in to change notification settings - Fork 742
Use the constness of the inner type when converting array function args. #513
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
Conversation
…nction arguments. Fixes rust-lang#509 I'm actually surprised we had no tests for this. Signed-off-by: Emilio Cobos Álvarez <[email protected]>
r? @fitzgen |
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.
Great! Thanks!
@@ -2828,7 +2828,7 @@ mod utils { | |||
// [1]: http://c0x.coding-guidelines.com/6.7.5.3.html | |||
let arg_ty = match *arg_ty.canonical_type(ctx).kind() { | |||
TypeKind::Array(t, _) => { | |||
t.to_rust_ty(ctx).to_ptr(arg_ty.is_const(), ctx.span()) | |||
t.to_rust_ty(ctx).to_ptr(ctx.resolve_type(t).is_const(), ctx.span()) |
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.
dat copy paste
@bors-servo r+ |
@bors-servo r=fitzgen |
📌 Commit af6d59c has been approved by |
Use the constness of the inner type when converting array function args. Fixes #509 I'm actually surprised we had no tests for this.
☀️ Test successful - status-travis |
Fixes #509
I'm actually surprised we had no tests for this.