Conversation
leonardoalt
reviewed
Sep 26, 2024
backend/src/field_filter.rs
Outdated
| let result = <$restricted_factory as BackendFactory<$supported_type>>::create( | ||
| &$restricted_factory, | ||
| std::mem::transmute(pil), std::mem::transmute(fixed), output_dir, setup, | ||
| std::mem::transmute::<std::sync::Arc<powdr_ast::analyzed::Analyzed<F>>, std::sync::Arc<powdr_ast::analyzed::Analyzed<$supported_type>>>(pil), std::mem::transmute::<std::sync::Arc<std::vec::Vec<(std::string::String, powdr_executor::constant_evaluator::VariablySizedColumn<F>)>>, std::sync::Arc<std::vec::Vec<(std::string::String, powdr_executor::constant_evaluator::VariablySizedColumn<$supported_type>)>>>(fixed), output_dir, setup, |
Member
There was a problem hiding this comment.
Wait this evil macro was merged after all?
Collaborator
Author
There was a problem hiding this comment.
- what
A new clippy rule on transmute to make things more explicit. I just used the suggestion for now, it can probably be made less verbose.
Member
There was a problem hiding this comment.
Wait this evil macro was merged after all?
The first unsafe solution got nuked by rust. The evil macro was the only PR in town.
rust-lang/rust#120248 (comment)
chriseth
reviewed
Sep 26, 2024
riscv/src/asm/mod.rs
Outdated
| @@ -1,3 +1,8 @@ | |||
| // this is required to please clippy which finds dome dead code in the | |||
Member
There was a problem hiding this comment.
But the generated parser already has allow(all) (in parser.rs) - where exactly is the dead code?
Collaborator
Author
There was a problem hiding this comment.
The parser has allow(clippy::all) but dead_code is a rustc lint not a clippy lint. I moved it there!
chriseth
approved these changes
Sep 27, 2024
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.
This is a prerequisite for #1845
TODO: