-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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 12 pull requests #76265
Merged
Merged
Rollup of 12 pull requests #76265
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
These methods are like the ones on `std::array::FixedSizeArray` and in the crate `arraytools`.
Constify the following methods of `std::net::Ipv4Addr`: - `octets` - `is_loopback` - `is_private` - `is_link_local` - `is_shared` - `is_ietf_protocol_assignment` - `is_benchmarking` - `is_multicast` - `is_documentation` Also insta-stabilizes these methods as const. Possible because of the stabilization of const integer arithmetic and control flow.
Makes the following methods of `std::net::Ipv4Addr` unstable const under the `const_ipv4` feature: - `is_global` - `is_reserved` - `is_broadcast` - `to_ipv6_compatible` - `to_ipv6_mapped` This results in all methods of `Ipv4Addr` being const. Also adds tests for these methods in a const context.
The HIR Id trick is insufficient to prevent query cycles when optimizing generators, since merely requesting a layout of a generator also computes its `optimized_mir`. Make no attempts to inline functions into generators within the same crate to avoid query cycles.
`try_reserve` and `try_reserve_exact` docs refer to calling `reserve` and `reserve_exact`. `try_reserve_exact` example uses `try_reserve` method instead of `try_reserve_exact`.
…le, r=LukasKalbertodt Add a note for Ipv4Addr::to_ipv6_compatible Previous discussion: rust-lang#75019 > I think adding a comment saying "This isn't typically the method you want; these addresses don't typically function on modern systems. Use `to_ipv6_mapped` instead." would be a good first step, whether this method gets marked as deprecated or not. _Originally posted by @joshtriplett in rust-lang#75150 (comment)
…-to-array, r=Mark-Simulacrum Add `[T; N]::as_[mut_]slice` Part of me trying to populate arrays with a couple of basic useful methods, like slices already have. The ability to add methods to arrays were added in rust-lang#75212. Tracking issue: rust-lang#76118 This adds: ```rust impl<T, const N: usize> [T; N] { pub fn as_slice(&self) -> &[T]; pub fn as_mut_slice(&mut self) -> &mut [T]; } ``` These methods are like the ones on `std::array::FixedSizeArray` and in the crate `arraytools`.
Make all methods of `std::net::Ipv4Addr` const Make the following methods of `std::net::Ipv4Addr` unstable const under the `const_ipv4` feature: - `octets` - `is_loopback` - `is_private` - `is_link_local` - `is_global` (unstable) - `is_shared` (unstable) - `is_ietf_protocol_assignment` (unstable) - `is_benchmarking` (unstable) - `is_reserved` (unstable) - `is_multicast` - `is_broadcast` - `is_documentation` - `to_ipv6_compatible` - `to_ipv6_mapped` This would make all methods of `Ipv6Addr` const. Of these methods, `is_global`, `is_broadcast`, `to_ipv6_compatible`, and `to_ipv6_mapped` require a change in implementation. Part of rust-lang#76205
Link to slice pattern in array docs Fix a todo in rust-lang/reference#739 (comment)
…tic, r=petrochenkov Replace MinGW library hack with heuristic controlling link mode Depends on rust-lang#76158 Closes rust-lang#68887
…=scottmcm Rename and expose LoopState as ControlFlow Basic PR for rust-lang#75744. Addresses everything there except for documentation; lots of examples are probably a good idea.
…terator, r=jyn514 Move to intra-doc links for library/core/src/iter/traits/iterator.rs Helps with rust-lang#75080. @jyn514 We're almost finished with this issue. Thanks for mentoring. If you have other topics to work on just let me know, I will be around in Discord. @rustbot modify labels: T-doc, A-intra-doc-links Known issues: * Link from `core` to `std` (rust-lang#74481): [`OsStr`] [`String`] [`VecDeque<T>`]
Read: adjust a FIXME reference There's already another reference to rust-lang#42788 for basically the same problem, so lets reuse it here: https://github.com/rust-lang/rust/blob/5e208efaa850efaa97495e81c49cf0f5767e8f49/library/std/src/io/mod.rs#L369-L376 r? @Dylan-DPC
Fix typos in vec try_reserve(_exact) docs `try_reserve` and `try_reserve_exact` docs refer to calling `reserve` and `reserve_exact`. `try_reserve_exact` example uses `try_reserve` method instead of `try_reserve_exact`.
…ic-morse inliner: Avoid query cycles when optimizing generators The HIR Id trick is insufficient to prevent query cycles when optimizing generators, since merely requesting a layout of a generator also computes its `optimized_mir`. Make no attempts to inline functions into generators within the same crate to avoid query cycles. Fixes rust-lang#76181.
Update books ## reference 4 commits in 1b6c4b0afab97c0230433466c97167bbbe8445f6..25391dba46262f882fa846beefaff54a966a8fa5 2020-08-18 17:04:28 -0700 to 2020-09-02 07:22:55 -0700 - clarify when reading uninititalized memory is allowed (rust-lang/reference#852) - Update patterns chapter, add rest patterns. (rust-lang/reference#876) - Improve Type-Coersion Documentation (rust-lang/reference#843) - Added variable back into example. (rust-lang/reference#880) ## book 3 commits in c0a6a61b8205da14ac955425f74258ffd8ee065d..e5ed97128302d5fa45dbac0e64426bc7649a558c 2020-08-14 14:21:49 -0500 to 2020-08-31 12:53:40 -0500 - Fix type mismatch in listing 10-5 (rust-lang/book#2441) - Update ppendix-06-translation.md (rust-lang/book#2437) - Correct no-listing-10-result-in-tests: Take tests module out of the main function (rust-lang/book#2430) ## rust-by-example 3 commits in 80a10e22140e28392b99d24ed02f4c6d8cb770a0..19f0a0372af497b34369cf182d9d16156cab2969 2020-08-08 09:56:46 -0300 to 2020-08-26 09:38:48 -0300 - prefer `length` over `size` when talking about number of elements vs. bytesize (rust-lang/rust-by-example#1372) - Split out variable shadowing into a separate example (rust-lang/rust-by-example#1370) - Update extern crate related sections (rust-lang/rust-by-example#1369) ## edition-guide 1 commits in bd6e4a9f59c5c1545f572266af77f5c7a5bad6d1..81f16863014de60b53de401d71ff904d163ee030 2020-07-12 17:37:08 -0500 to 2020-08-27 13:56:31 -0700 - Fix a small typo. (rust-lang/edition-guide#218)
…rker, r=jyn514 Use intra-doc links in `core::marker` Part of rust-lang#75080. Also cleaned up a few things. --- @rustbot modify labels: A-intra-doc-links T-doc
@bors r+ rollup=never p=5 |
📌 Commit af331a2 has been approved by |
bors
added
the
S-waiting-on-bors
Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
label
Sep 3, 2020
☀️ Test successful - checks-actions, checks-azure |
This was referenced Sep 3, 2020
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
merged-by-bors
This PR was explicitly merged by bors.
S-waiting-on-bors
Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
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.
Successful merges:
[T; N]::as_[mut_]slice
#76120 (Add[T; N]::as_[mut_]slice
)std::net::Ipv4Addr
const #76142 (Make all methods ofstd::net::Ipv4Addr
const)core::marker
#76261 (Use intra-doc links incore::marker
)Failed merges:
r? @ghost