Uh oh!
There was an error while loading. Please reload this page.
Added diagnostic for pin! macro in addition to Box::pin if Unpin isn't implemented - #110259
Merged
Merged
Conversation
rustbot
commented
Apr 12, 2023
Collaborator
(rustbot has picked a reviewer for you, use r? to override) |
rustbot
commented
Apr 12, 2023
Collaborator
Hey! It looks like you've submitted a new PR for the library teams! If this PR contains changes to any Examples of
|
ndrewxie
commented
Apr 12, 2023
ContributorAuthor
r? @cjgillot |
cjgillot
commented
Apr 13, 2023
Contributor
@bors r+ |
bors
commented
Apr 13, 2023
Collaborator
bors added a commit
to rust-lang-ci/rust
that referenced
this pull request
Apr 13, 2023
…iaskrgr Rollup of 8 pull requests Successful merges: - rust-lang#109036 (Fix diff option conflict in UI test) - rust-lang#110193 (Check for body owner fallibly in error reporting) - rust-lang#110233 (Make rust-intrinsic ABI unwindable) - rust-lang#110259 (Added diagnostic for pin! macro in addition to Box::pin if Unpin isn't implemented) - rust-lang#110265 (Automatically update the LLVM submodule for musl target (and other places)) - rust-lang#110277 (dead-code-lint: de-dup multiple unused assoc functions) - rust-lang#110283 (Only emit alignment checks if we have a panic_impl) - rust-lang#110291 (Implement `Copy` for `LocationDetail`) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
This file contains hidden or 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
Sign up for freeto 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.
I made a PR earlier, but accidentally renamed a branch and that deleted the PR... sorry for the duplicate
Currently, if an operation on
Pin<T>is performed that requiresTto implementUnpin, the diagnostic suggestion is to useBox::pin("note: consider usingBox::pin").This PR suggests pin! as well, as that's another valid way of pinning a value, and avoids a heap allocation. Appropriate diagnostic suggestions were included to highlight the difference in semantics (local pinning for pin! vs non-local for Box::pin).
Fixes#109964