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

Remove unsafe block deemed unnecessary by compiler #2782

Closed

Conversation

thierrymarianne
Copy link

@thierrymarianne thierrymarianne commented Jan 19, 2025

Hello 👋🏼,

Please see this minor issue about the unsafe keyword originating in a warning message at compilation :
fixes #2781

Examples:

@thierrymarianne thierrymarianne changed the title Removed unsafe block deemed unnecessary by compiler Remove unsafe block deemed unnecessary by compiler Jan 19, 2025
@Skgland
Copy link
Contributor

Skgland commented Jan 19, 2025

I think the addr_of_mut!here used to be unsafe, so the unsafe block is necessary in older rust versions. Did you check whether the warning is there when using the mrsv as defined in the Cargo.toml and tested in CI?

Or rather does this compile without the unsafe block when using the msrv compiler?

I think the relevant change in rust would be rust-lang/rust#125834

@thierrymarianne
Copy link
Author

thierrymarianne commented Jan 19, 2025

Thank you, I didn't know the minimal supported Rust version was 1.77.

I'm checking these changes right now.

@thierrymarianne
Copy link
Author

Closing this issue as it fails the build for rust v1.77.
Sorry for the noise.

@thierrymarianne
Copy link
Author

thierrymarianne commented Jan 19, 2025

Would it make sense to add basic contributing guidelines (in the vein of what is suggested from CONTRIBUTING.md) to the repository where requirements like

checking against minimal supported Rust version

could be listed?

I also notice now the README contains the following:

Scryer Prolog must be built with Rust 1.70 and up.

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.

unsafe keyword deemed unnecessary by compiler at build
2 participants