-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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 #103393
Closed
Closed
Rollup of 7 pull requests #103393
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
The method takes two pointer arguments: one `self` supplying the pointer value, and a second pointer supplying the metadata. The new parameter type more clearly reflects the actual requirements. The provenance of the metadata parameter is disregarded completely. Using a mutable pointer in the call site can be coerced to a const pointer while the reverse is not true. An example of the current use: ```rust // Manually taking an unsized object from a `ManuallyDrop` into another allocation. let val: &core::mem::ManuallyDrop<T> = …; let ptr = val as *const _ as *mut T; let ptr = uninit.as_ptr().with_metadata_of(ptr); ``` This could then instead be simplified to: ```rust // Manually taking an unsized object from a `ManuallyDrop` into another allocation. let val: &core::mem::ManuallyDrop<T> = …; let ptr = uninit.as_ptr().with_metadata_of(&**val); ```
This checks that: * the handle is a pipe * the pipe's file name starts with "msys-" or "cygwin-" rather than looking in the full path.
The latest version of `rental` (v0.5.6) contains a fix that allows it to compile without relying on the pretty-print back-compat hack. Hopefully, there are no longer any crates relying on the affected versions of the (much less popular) `procedural-masquerade` crate. This should allow us to target the pretty-print back-compat hack specifically to older versions of `rental`, and specifically mention upgrading to `rental` v0.5.6 in the lint message.
Only apply `ProceduralMasquerade` hack to older versions of `rental` The latest version of `rental` (v0.5.6) contains a fix that allows it to compile without relying on the pretty-print back-compat hack. Hopefully, there are no longer any crates relying on the affected versions of the (much less popular) `procedural-masquerade` crate. This should allow us to target the pretty-print back-compat hack specifically to older versions of `rental`, and specifically mention upgrading to `rental` v0.5.6 in the lint message.
Slightly tweak comments wrt `lint_overflowing_range_endpoint` From the review: rust-lang#101986 (comment) It _seemed_ that the lint was not emitted when the `if` check failed, but _actually_ this happens already in a special case and the lint is emitted outside of this function, if this function doesn't. I've cleared up the code/comments a bit, so it's more obvious :) r? ``@estebank``
…oss-crate-gat-params, r=GuillaumeGomez rustdoc: render bounds of cross-crate GAT params Follow-up to rust-lang#102439. Render the trait bounds of type parameters of cross-crate (generic) associated types. ````@rustbot```` label T-rustdoc A-cross-crate-reexports r? ````@GuillaumeGomez````
…htriplett (rust-lang#102929) Implement `String::leak` (attempt 2) Implementation of `String::leak` (rust-lang#102929) ACP: rust-lang/libs-team#109 Supersedes rust-lang#102941 (see previous reviews there) ``@rustbot`` label +T-libs-api -T-libs
…homcc Add a forgotten check for NonNull::new_unchecked's precondition Looks like I forgot this function a while ago in rust-lang#92686 r? ``@thomcc``
…nter_argument, r=dtolnay Adjust argument type for mutable with_metadata_of (rust-lang#75091) The method takes two pointer arguments: one `self` supplying the pointer value, and a second pointer supplying the metadata. The new parameter type more clearly reflects the actual requirements. The provenance of the metadata parameter is disregarded completely. Using a mutable pointer in the call site can be coerced to a const pointer while the reverse is not true. In some cases, the current parameter type can thus lead to a very slightly confusing additional cast. [Example](HeroicKatora/static-alloc@cad9377). ```rust // Manually taking an unsized object from a `ManuallyDrop` into another allocation. let val: &core::mem::ManuallyDrop<T> = …; let ptr = val as *const _ as *mut T; let ptr = uninit.as_ptr().with_metadata_of(ptr); ``` This could then instead be simplified to: ```rust // Manually taking an unsized object from a `ManuallyDrop` into another allocation. let val: &core::mem::ManuallyDrop<T> = …; let ptr = uninit.as_ptr().with_metadata_of(&**val); ``` Tracking issue: rust-lang#75091 `@dtolnay` you're reviewed rust-lang#95249, would you mind chiming in?
Reduce false positives in msys2 detection Currently msys2 will be detected by getting the file path and looking to see if it contains the substrings "msys-" and "-ptr" (or "cygwin-" and "-pty"). This risks false positives, especially with filesystem files and if `GetFileInformationByHandleEx` returns a [full path](https://learn.microsoft.com/en-us/windows-hardware/drivers/ddi/ntifs/nf-ntifs-ntqueryinformationfile#remarks). This PR adds a check to see if the handle is a pipe before doing the substring search. Additionally, for "msys2-" or "cygwin-" it only checks if the file name starts with the substring rather than looking at the whole path.
rustbot
added
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
T-libs
Relevant to the library team, which will review and decide on the PR/issue.
T-rustdoc
Relevant to the rustdoc team, which will review and decide on the PR/issue.
rollup
A PR which is a rollup
labels
Oct 22, 2022
@bors r+ rollup=never p=5 |
bors
added
the
S-waiting-on-bors
Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
label
Oct 22, 2022
⌛ Testing commit 153e25d with merge be3c2469d87652dbae47597c60e5f87af09ecc7e... |
💔 Test failed - checks-actions |
bors
added
S-waiting-on-review
Status: Awaiting review from the assignee but also interested parties.
and removed
S-waiting-on-bors
Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
labels
Oct 22, 2022
The job Click to see the possible cause of the failure (guessed by this bot)
|
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
S-waiting-on-review
Status: Awaiting review from the assignee but also interested parties.
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
T-libs
Relevant to the library team, which will review and decide on the PR/issue.
T-rustdoc
Relevant to the rustdoc team, which will review and decide on the PR/issue.
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:
ProceduralMasquerade
hack to older versions ofrental
#94063 (Only applyProceduralMasquerade
hack to older versions ofrental
)lint_overflowing_range_endpoint
#102602 (Slightly tweak comments wrtlint_overflowing_range_endpoint
)String::leak
(attempt 2) #103280 ((Tracking Issue forString::leak
#102929) ImplementString::leak
(attempt 2))Failed merges:
r? @ghost
@rustbot modify labels: rollup
Create a similar rollup