Skip to content
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

Upgrade Rust to 1.81 #1846

Merged
merged 4 commits into from
Sep 27, 2024
Merged

Upgrade Rust to 1.81 #1846

merged 4 commits into from
Sep 27, 2024

Conversation

Schaeff
Copy link
Collaborator

@Schaeff Schaeff commented Sep 26, 2024

This is a prerequisite for #1845

TODO:

  • narrow down or remove the dead_code exception

@@ -34,10 +34,10 @@ macro_rules! generalize_factory {
unsafe {
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,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  1. what

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wait this evil macro was merged after all?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  1. 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.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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)

@@ -1,3 +1,8 @@
// this is required to please clippy which finds dome dead code in the
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

But the generated parser already has allow(all) (in parser.rs) - where exactly is the dead code?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The parser has allow(clippy::all) but dead_code is a rustc lint not a clippy lint. I moved it there!

@Schaeff Schaeff added this pull request to the merge queue Sep 27, 2024
Merged via the queue into main with commit 0358dec Sep 27, 2024
14 checks passed
@Schaeff Schaeff deleted the update-rust-to-1-81 branch September 27, 2024 14:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants