-
Notifications
You must be signed in to change notification settings - Fork 13k
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
Beta next #29112
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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
Temporary 'fix' for rust-lang#26775
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
#29050
#28779
#28681
#28626
#28560
#28486
#28131
r? @alexcrichton
(remember to remove the beta-nominated tags from linked issues)