diff options
author | bors-servo <lbergstrom+bors@mozilla.com> | 2018-05-14 12:15:59 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-05-14 12:15:59 -0400 |
commit | 74dcb202e398f8101a5bb387628d21ed0f781359 (patch) | |
tree | 5a40cdad7e6a79b798a8da584bc14ea7a861cd41 /src/codegen/impl_partialeq.rs | |
parent | 515ca97b462f348b7b3bb9eaea98b2e0bb1b624b (diff) | |
parent | 1fc8172889e981d45e819c9f394fe4b6b41dbc38 (diff) |
Auto merge of #1311 - cynecx:canonicalize_pointer_ty, r=emilio
Canonicalize a type (pointer type) first before checking for constness
This fixes cases like:
```cpp
int sodium_munlock(int* const addr); // addr itself is const but the pointer points to mutable data
```
Before fix:
```rust
extern "C" {
pub fn sodium_munlock(
addr: *const ::std::os::raw::c_int,
) -> ::std::os::raw::c_int;
}
```
After this patch:
```rust
extern "C" {
pub fn sodium_munlock(
addr: *mut ::std::os::raw::c_int,
) -> ::std::os::raw::c_int;
}
```
Diffstat (limited to 'src/codegen/impl_partialeq.rs')
0 files changed, 0 insertions, 0 deletions