Skip to content
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

Beta next #29112

Merged
merged 10 commits into from
Oct 16, 2015
Merged

Beta next #29112

merged 10 commits into from
Oct 16, 2015

Conversation

brson
Copy link
Contributor

@brson brson commented Oct 16, 2015

#29050
#28779
#28681
#28626
#28560
#28486
#28131

r? @alexcrichton

(remember to remove the beta-nominated tags from linked issues)

Robin Kruppe and others added 10 commits October 16, 2015 12:59
This lint warning was originally intended to help against misuse of the old Rust
`int` and `uint` types in FFI bindings where the Rust `int` was not equal to the
C `int`. This confusion no longer exists (as Rust's types are now `isize` and
`usize`), and as a result the need for this lint has become much less over time.

Additionally, starting with [the RFC for libc][rfc] it's likely that `isize` and
`usize` will be quite common in FFI bindings (e.g. they're the definition of
`size_t` and `ssize_t` on many platforms).

[rfc]: rust-lang/rfcs#1291

This commit disables these lints to instead consider `isize` and `usize` valid
types to have in FFI signatures.
Because of type inference, duplicate obligations exist and cause duplicate
errors. To avoid this, only display the first error for each (predicate,span).

The inclusion of the span is somewhat bikesheddy, but *is* the more
conservative option (it does not remove some instability, as duplicate
obligations are ignored by `duplicate_set` under some inference conditions).

Fixes rust-lang#28098
cc rust-lang#21528 (is it a dupe?)
different supertraits can suffer from the same object-safety violation,
leading to duplication in the error message. Avoid it.

Fixes rust-lang#20692
Conflicts:
	src/librustc_lint/builtin.rs
(12 was chosen to be consistent with what we do for tuples)

Fixes rust-lang#28559
@rust-highfive
Copy link
Collaborator

warning Warning warning

  • Pull requests are usually filed against the master branch for this repo, but this one is against beta. Please double check that you specified the right target!

alexcrichton added a commit that referenced this pull request Oct 16, 2015
@alexcrichton alexcrichton merged commit 20eba40 into rust-lang:beta Oct 16, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants