Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.
Sign uprustc: Don't lint about isize/usize in FFI #28779
Conversation
rust-highfive
assigned
pcwalton
Sep 30, 2015
This comment has been minimized.
This comment has been minimized.
|
r? @pcwalton (rust_highfive has picked a reviewer for you, use r? to override) |
This comment has been minimized.
This comment has been minimized.
|
r? @nrc |
rust-highfive
assigned
nrc
and unassigned
pcwalton
Sep 30, 2015
This comment has been minimized.
This comment has been minimized.
|
cc @briansmith, #28096 |
This comment has been minimized.
This comment has been minimized.
briansmith
commented
Sep 30, 2015
|
Great. Although I'd figured out how to change the lint implementation easy enough, I was struggling to figure out how to update the tests. Thanks for taking this over. |
This comment has been minimized.
This comment has been minimized.
|
No problem! Thanks again for proposing the change :) |
bluss
added
the
relnotes
label
Oct 1, 2015
This comment has been minimized.
This comment has been minimized.
|
@bors: r+ |
This comment has been minimized.
This comment has been minimized.
|
|
bors
added a commit
that referenced
this pull request
Oct 6, 2015
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
bors
merged commit bd6758a
into
rust-lang:master
Oct 6, 2015
This comment has been minimized.
This comment has been minimized.
|
Nominating for a beta backport, I think this will be an instrumental part of rust-lang/rfcs#1291 and I think the impact is pretty low. |
alexcrichton
deleted the
alexcrichton:ffi-isize-usize
branch
Oct 6, 2015
alexcrichton
added
beta-nominated
T-lang
labels
Oct 6, 2015
alexcrichton
referenced this pull request
Oct 7, 2015
Closed
Improve safety & usability of |size_t| and |ssize_t|. #28096
This comment has been minimized.
This comment has been minimized.
|
@rust-lang/lang I have no opinion about backporting this to beta; I certainly don't object, but I also don't think its the end of the world if we end up waiting a release cycle for this change to the lint. |
This comment has been minimized.
This comment has been minimized.
|
I wouldn't normally want to backport this, but the patch is small, and so if @alexcrichton is in favor I'm ok with it. |
alexcrichton commentedSep 30, 2015
This lint warning was originally intended to help against misuse of the old Rust
intanduinttypes in FFI bindings where the Rustintwas not equal to theC
int. This confusion no longer exists (as Rust's types are nowisizeandusize), and as a result the need for this lint has become much less over time.Additionally, starting with the RFC for libc it's likely that
isizeandusizewill be quite common in FFI bindings (e.g. they're the definition ofsize_tandssize_ton many platforms).This commit disables these lints to instead consider
isizeandusizevalidtypes to have in FFI signatures.