refactor to use &raw mut (alternative version)#105
Open
antonio-hickey wants to merge 2 commits intoRust-for-Linux:mainfrom
Open
refactor to use &raw mut (alternative version)#105antonio-hickey wants to merge 2 commits intoRust-for-Linux:mainfrom
antonio-hickey wants to merge 2 commits intoRust-for-Linux:mainfrom
Conversation
Instead of check if a feature is already stable, simply enable them and allow the warning if the feature is already stable. This avoids the need of the hardcoding whether a feature has been stabilized at a given version. Signed-off-by: Gary Guo <gary@garyguo.net>
Replacing all occurrences of `addr_of_mut!(place)` with `&raw mut place`. This will allow us to reduce macro complexity, and improve consistency with existing reference syntax as `&raw mut` is similar to `&mut` making it fit more naturally with other existing code. Suggested-by: Benno Lossin <benno.lossin@proton.me> Link: Rust-for-Linux/linux#1148 Signed-off-by: Antonio Hickey <contact@antoniohickey.com>
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.
Replacing all occurrences of addr_of_mut!(place) with &raw mut place.
This will allow us to reduce macro complexity, and improve consistency with existing reference syntax as &raw mut is similar to &mut making it fit more naturally with other existing code.
NOTE: A alternative version of #49, but based on #102
NOTE: Still have some work to finish on this.