-
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 10 pull requests #76129
Closed
Closed
Rollup of 10 pull requests #76129
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
- 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.
StringReader is an intornal abstraction which at the moment changes a lot, so these unit tests cause quite a bit of friction. Moving them to rustc_lexer and more ingerated-testing style should make them much less annoying, hopefully without decreasing their usefulness much. Note that coloncolon tests are removed (it's unclear what those are testing). \r\n tests are removed as well, as we normalize line endings even before lexing.
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.
cleanup: Remove duplicate library names from `Cargo.toml`s
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
Remove unused function
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.
Successful merges:
Cargo.toml
s #74668 (cleanup: Remove duplicate library names fromCargo.toml
s)core/src/slice.mod.rs
#75932 (Use intra-doc links forcore/src/slice.mod.rs
)Failed merges:
r? @ghost