-
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
Rollup of 5 pull requests #23727
Closed
Closed
Rollup of 5 pull requests #23727
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
Contributor
erickt
commented
Mar 26, 2015
- Successful merges: Add associated types support for #[derive(...)] #21237, Greatly speed up reading/writing slices with #[inline] #23680, Update pointers.md #23690, std: Add net::IpAddr, destabilize lookup_host #23711, Deprecate as_mut_slice methods #23721
- Failed merges:
When built with `rustc -O`: before: test bench_read_slice ... bench: 68 ns/iter (+/- 56) test bench_read_vec ... bench: 78 ns/iter (+/- 21) test bench_write_slice ... bench: 133 ns/iter (+/- 46) test bench_write_vec ... bench: 308 ns/iter (+/- 69) after: test bench_read_slice ... bench: 32 ns/iter (+/- 10) test bench_read_vec ... bench: 32 ns/iter (+/- 8) test bench_write_slice ... bench: 53 ns/iter (+/- 12) test bench_write_vec ... bench: 247 ns/iter (+/- 172)
This commits adds back an `IpAddr` enum matching the `SocketAddr` enum, but without a port. The enumeration is `#[unstable]`. The `lookup_host` function and iterator are also destabilized behind a new feature gate due to questions around the semantics of returning `SocketAddr` values.
This is technically a breaking change as it deprecates and unstables some previously stable apis that were missed in the last round of deprecations. [breaking change]
This PR adds support for associated types to the `#[derive(...)]` syntax extension. In order to do this, it switches over to using where predicates to apply the type constraints. So now this: ```rust type Trait { type Type; } #[derive(Clone)] struct Foo<A> where A: Trait { a: A, b: <A as Trait>::Type, } ``` Gets expended into this impl: ```rust impl<A: Clone> Clone for Foo<A> where A: Trait, <A as Trait>::Type: Clone, { fn clone(&self) -> Foo<T> { Foo { a: self.a.clone(), b: self.b.clone(), } } } ```
before: test bench_read_slice ... bench: 68 ns/iter (+/- 56) test bench_read_vec ... bench: 78 ns/iter (+/- 21) test bench_write_slice ... bench: 133 ns/iter (+/- 46) test bench_write_vec ... bench: 308 ns/iter (+/- 69) after: test bench_read_slice ... bench: 32 ns/iter (+/- 10) test bench_read_vec ... bench: 32 ns/iter (+/- 8) test bench_write_slice ... bench: 53 ns/iter (+/- 12) test bench_write_vec ... bench: 247 ns/iter (+/- 172)
This commits adds back an `IpAddr` enum matching the `SocketAddr` enum, but without a port. The enumeration is `#[unstable]`. The `lookup_host` function and iterator are also destabilized behind a new feature gate due to questions around the semantics of returning `SocketAddr` values.
This is technically a breaking change as it deprecates and unstables some previously stable apis that were missed in the last round of deprecations. [breaking change]
r? @huonw (rust_highfive has picked a reviewer for you, use r? to override) |
@bors: r+ p=21 |
📌 Commit 1dbcb5c has been approved by |
⌛ Testing commit 1dbcb5c with merge a2d93b8... |
💔 Test failed - auto-mac-64-nopt-t |
|
Closing in favor of #23796, but thanks! |
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.