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

Rollup of 7 pull requests #32794

Merged
merged 20 commits into from
Apr 7, 2016
Merged

Rollup of 7 pull requests #32794

merged 20 commits into from
Apr 7, 2016

Conversation

bluss and others added 14 commits April 5, 2016 14:06
Where T is a type that can be compared for equality bytewise, we can use
memcmp. We can also use memcmp for PartialOrd, Ord for [u8] and by
extension &str.

This is an improvement for example for the comparison [u8] == [u8] that
used to emit a loop that compared the slices byte by byte.

One worry here could be that this introduces function calls to memcmp
in contexts where it should really inline the comparison or even
optimize it out, but llvm takes care of recognizing memcmp specifically.
The old test for Ord used no asserts, and appeared to have a wrong test. (!).
The initial implementation of specialization did not use the
`fast_reject` mechanism when checking for overlap, which caused a
serious performance regression in some cases.

This commit modifies the specialization graph to use simplified types
for fast rejection when possible, and along the way refactors the logic
for building the specialization graph.

Closes rust-lang#32499
This should avoid the trait impls showing up in rustdoc.
…lity

in `typeck` and in `privacy::PrivacyVisitor`.
@Manishearth
Copy link
Member Author

@bors r+

@bors
Copy link
Contributor

bors commented Apr 7, 2016

📌 Commit 2aa3338 has been approved by Manishearth

@rust-highfive
Copy link
Collaborator

r? @nrc

(rust_highfive has picked a reviewer for you, use r? to override)

@Manishearth
Copy link
Member Author

@bors r+ p=10

@bors
Copy link
Contributor

bors commented Apr 7, 2016

💡 This pull request was already approved, no need to approve it again.

@bors
Copy link
Contributor

bors commented Apr 7, 2016

📌 Commit 2aa3338 has been approved by Manishearth

@bors
Copy link
Contributor

bors commented Apr 7, 2016

⌛ Testing commit 2aa3338 with merge 4c20e53...

@bors
Copy link
Contributor

bors commented Apr 7, 2016

💔 Test failed - auto-linux-musl-64-opt

…tsakis

Lay groundwork for RFC 1422  and improve `PrivateItemsInPublicInterfacesVisitor`

This PR lays groundwork for RFC 1422 (cc rust-lang#32409) and improves `PrivateItemsInPublicInterfacesVisitor`. More specifically, it
 - Refactors away `hir::Visibility::inherit_from`, the semantics of which are obsolete.
 - Makes `hir::Visibility` non-`Copy` so that we will be able to add new variants to represent `pub(restricted)` (for example, `Visibility::Restricted(Path)`).
 - Adds a new `Copy` type `ty::Visibility` that represents a visibility value, i.e. a characterization of where an item is accessible. This is able to represent `pub(restricted)` visibilities.
 - Improves `PrivateItemsInPublicInterfacesVisitor` so that it checks for items in an interface that are less visible than the interface. This fixes rust-lang#30079 but doesn't change any other behavior.

r? @nikomatsakis
Specialize equality for [T] and comparison for [u8] to use memcmp when possible

Specialize equality for [T] and comparison for [u8] to use memcmp when possible

Where T is a type that can be compared for equality bytewise, we can use
memcmp. We can also use memcmp for PartialOrd, Ord for [u8].

Use specialization to call memcmp in PartialEq for slices for certain element types. This PR does not change the user visible API since the implementation uses an intermediate trait. See commit messages for more information.

The memcmp signature was changed from `*const i8` to `*const u8` which is in line with how the memcmp function is defined in C (taking const void * arguments, interpreting the values as unsigned bytes for purposes of the comparison).
Reinstate fast_reject for overlap checking

The initial implementation of specialization did not use the
`fast_reject` mechanism when checking for overlap, which caused a
serious performance regression in some cases.

This commit modifies the specialization graph to use simplified types
for fast rejection when possible, and along the way refactors the logic
for building the specialization graph.

Closes rust-lang#32499

r? @nikomatsakis
Fix typos in atomic compare_exchange.

Failure ordering can't be Release, not (not) Acquire. Seems like a typo copy-pasted all over.
…ors, r=eddyb

resolve: Avoid emitting redundant path resolution errors

This PR avoids emitting redundant path resolution errors in `resolve` (fixes rust-lang#32760).

r? @eddyb
@Manishearth
Copy link
Member Author

@bors r+ force

@bors
Copy link
Contributor

bors commented Apr 7, 2016

📌 Commit b0f81a3 has been approved by Manishearth

@bors
Copy link
Contributor

bors commented Apr 7, 2016

⌛ Testing commit b0f81a3 with merge 470ca1c...

bors added a commit that referenced this pull request Apr 7, 2016
Rollup of 7 pull requests

- Successful merges: #32674, #32699, #32711, #32745, #32748, #32757, #32789
- Failed merges:
@bors bors merged commit b0f81a3 into rust-lang:master Apr 7, 2016
@Manishearth Manishearth deleted the rollup branch April 7, 2016 17:55
@Centril Centril added the rollup A PR which is a rollup label Oct 2, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
rollup A PR which is a rollup
Projects
None yet
Development

Successfully merging this pull request may close these issues.

10 participants