-
Notifications
You must be signed in to change notification settings - Fork 12.9k
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 9 pull requests #76137
Closed
Closed
Rollup of 9 pull requests #76137
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
Constify the following methods of `core::cmp::Ordering`: - `reverse` - `then` Possible because of rust-lang#49146 (Allow `if` and `match` in constants).
- most are using primitive types links, which cannot be used with intra links at the moment - also `std` cannot be referenced in any link
reference counted pointer -> reference-counted pointer
Co-authored-by: Joshua Nelson <joshua@yottadb.com>
`alloc::slice` uses `core::slice` functions, documentation are copied from there and the links as well without resolution. `crate::ptr...` cannot be resolved in `alloc::slice`, but `ptr` itself is imported in both `alloc::slice` and `core::slice`, so we used that instead.
Fixes rust-lang#75930 This changes the tokens seen by a proc-macro. However, ising a `#[cfg]` attribute on a generic paramter is unusual, and combining it with a proc-macro derive is probably even more unusual. I don't expect this to cause any breakage.
This commit removes the obsolete printer and replaces all uses of it with `FmtPrinter`. Of the replaced uses, all but one use was in `debug!` logging, two cases were notable: - `MonoItem::to_string` is used in `-Z print-mono-items` and therefore affects the output of all codegen-units tests. - `DefPathBasedNames` was used in `librustc_codegen_llvm/type_of.rs` with `LLVMStructCreateNamed` and that'll now get different values, but this should result in no functional change. Signed-off-by: David Wood <david@davidtw.co>
…ed() These are unsafe variants of the non-unchecked functions and don't do any bounds checking. For the time being these are not public and only a preparation for the following commit. Making it public and stabilization can follow later and be discussed in rust-lang#76014 .
…s during construction LLVM can't figure out in let rem = self.len() % chunk_size; let len = self.len() - rem; let (fst, snd) = self.split_at(len); and let rem = self.len() % chunk_size; let (fst, snd) = self.split_at(rem); that the index passed to split_at() is smaller than the slice length and adds a bounds check plus panic for it. Apart from removing the overhead of the bounds check this also allows LLVM to optimize code around the ChunksExact iterator better.
Thanks to Ivan Tham, who gave the majority of these suggestions during their review.
`const_ordering` will stabilize in version 1.48.0
Make some Ordering methods const Constify the following methods of `core::cmp::Ordering`: - `reverse` - `then` Possible because of rust-lang#49146 (Allow `if` and `match` in constants). Tracking issue: rust-lang#76113
Fix typo in release notes
Use intra-doc links for `core/src/slice.mod.rs` partial help in rust-lang#75080 r? @jyn514 - most are using primitive types links, which cannot be used with intra links at the moment - also `std` cannot be referenced in any link, `std::ptr::NonNull` and `std::slice` could not be referenced
…ounds-check, r=nagisa Get rid of bounds check in slice::chunks_exact() and related function… …s during construction LLVM can't figure out in let rem = self.len() % chunk_size; let len = self.len() - rem; let (fst, snd) = self.split_at(len); and let rem = self.len() % chunk_size; let (fst, snd) = self.split_at(rem); that the index passed to split_at() is smaller than the slice length and adds a bounds check plus panic for it. Apart from removing the overhead of the bounds check this also allows LLVM to optimize code around the ChunksExact iterator better.
Switch to intra-doc links in core/src/{convert,iter}/mod.rs Partial fix for rust-lang#75080 @rustbot modify labels: T-doc, A-intra-doc-links, T-rustdoc r? @jyn514 couldn't fix these ```rust ../../std/string/struct.String.html ../../std/primitive.never.html ../../std/sync/mpsc/struct.TryIter.html ```
…petrochenkov Run cfg-stripping on generic parameters before invoking derive macros Fixes rust-lang#75930 This changes the tokens seen by a proc-macro. However, ising a `#[cfg]` attribute on a generic paramter is unusual, and combining it with a proc-macro derive is probably even more unusual. I don't expect this to cause any breakage.
Liballoc extend use intra doc link Superseeds https://github.com/rust-lang/rust/pull/75729/commits r? @jyn514
…te-pretty-printer, r=eddyb ty: remove obsolete pretty printer Fixes rust-lang#61139. This PR removes the obsolete printer and replaces all uses of it with `FmtPrinter`. Of the replaced uses, all but one use was in `debug!` logging, two cases were notable: - `MonoItem::to_string` is used in `-Z print-mono-items` and therefore affects the output of all codegen-units tests (which have been updated). - `DefPathBasedNames` was used in `librustc_codegen_llvm/type_of.rs` with `LLVMStructCreateNamed` and that'll now get different values, but nothing will break as a result of this. cc @eddyb (whom I've discussed this with)
Add missing hyphen reference counted pointer -> reference-counted pointer @rustbot modify labels: T-doc
☔ The latest upstream changes (presumably #75463) made this pull request unmergeable. Please resolve the merge conflicts. |
bors
added
the
S-waiting-on-author
Status: This is awaiting some action (such as code changes or more information) from the author.
label
Aug 31, 2020
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
S-waiting-on-author
Status: This is awaiting some action (such as code changes or more information) from the author.
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:
core/src/slice.mod.rs
#75932 (Use intra-doc links forcore/src/slice.mod.rs
)Failed merges:
r? @ghost