remove superfluous pinning of Unpin types and exploits of the pin! macro#1
Open
Morgane55440 wants to merge 1 commit into
Open
remove superfluous pinning of Unpin types and exploits of the pin! macro#1Morgane55440 wants to merge 1 commit into
Morgane55440 wants to merge 1 commit into
Conversation
|
For context, For reference, here's the build output of your code on the beta version of Rust, which will be released as stable Rust 1.97.0. Your code will fail to compile with this version of Rust. https://crater-reports.s3.amazonaws.com/beta-1.97-3-v2/1.97.0-beta.1/gh/rockwotj.tigerdns/log.txt Please refer to the documentation for the correct usage of Sorry for the inconvenience. |
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 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.
the pinning of
[u8],str,Cstr, and similar types, is pointless as these types areUnpinpinning an
Unpintype does nothing at all. aPin<&mut [u8]>behaves exactly the same as a&mut [u8]in all ways that matter.but this is not really a problem.
what is a problem is the use of the
pin!macro in this codebase.the
pin!macro has a bug, and this code was (most likely by mistake) abusing that bug.thankfully, due to the fact all the types in play are
Unpin, this was not a real problem, but because this bug is being fixed, your code will soon stop compiling.in order tomake sure your code keeps compiling in the future, please merge this PR, which removes the exploits without modifying any behavior.
link to the fix PR in the compiler : rust-lang/rust#153457