Skip to content

[Postponed] Rust: Add deny(unsafe_op_in_unsafe_fn) lint. #157

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

Closed
wants to merge 5 commits into from

Conversation

Yury-Fridlyand
Copy link

Add #![deny(unsafe_op_in_unsafe_fn)] project-wide: https://doc.rust-lang.org/beta/nightly-rustc/rustc_lint/builtin/static.UNSAFE_OP_IN_UNSAFE_FN.html

I have to update license commment style to avoid

compilation errors
error: an inner attribute is not permitted following an outer doc comment
 --> src/lib.rs:5:1
  |
1 | / /**
2 | |  * Copyright GLIDE-for-Redis Project Contributors - SPDX Identifier: Apache-2.0
3 | |  */
  | |___- previous doc comment
4 |
5 |   #![deny(unsafe_op_in_unsafe_fn)]
  |   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ not permitted following an outer doc comment
6 |
7 |   use glide_core::start_socket_listener;
  |   -------------------------------------- the inner attribute doesn't annotate this `use` import
  |
  = note: inner attributes, like `#![no_std]`, annotate the item enclosing them, and are usually found at the beginning of source files
help: to annotate the `use` import, change the attribute from inner to outer style
  |
5 - #![deny(unsafe_op_in_unsafe_fn)]
5 + #[deny(unsafe_op_in_unsafe_fn)]
  |

error: could not compile `glide-rs` (lib) due to previous error

Signed-off-by: Yury-Fridlyand <[email protected]>
Signed-off-by: Yury-Fridlyand <[email protected]>
Signed-off-by: Yury-Fridlyand <[email protected]>
@Yury-Fridlyand Yury-Fridlyand force-pushed the rust/dev_yuryf_unsafe branch from f574117 to 0495f87 Compare April 12, 2024 01:05
Signed-off-by: Yury-Fridlyand <[email protected]>
@Yury-Fridlyand Yury-Fridlyand marked this pull request as draft April 13, 2024 07:16
@Yury-Fridlyand
Copy link
Author

Yury-Fridlyand commented Apr 13, 2024

As discussed with the team, wait for rust 2024 release (October 2024) and update to it. This lint will be built-in and mandatory.

@Yury-Fridlyand Yury-Fridlyand marked this pull request as ready for review April 16, 2024 01:25
@Yury-Fridlyand Yury-Fridlyand marked this pull request as draft April 16, 2024 01:25
@Yury-Fridlyand Yury-Fridlyand changed the title Rust: Add deny(unsafe_op_in_unsafe_fn) lint. [Postponed] Rust: Add deny(unsafe_op_in_unsafe_fn) lint. Apr 16, 2024
Copy link

This PR is inactive for 60 days, hence marked as stale, if the PR is still relevant please perform some activity

@github-actions github-actions bot added the Stale label Apr 30, 2025
@Yury-Fridlyand
Copy link
Author

Supersed by valkey-io#3795

@Yury-Fridlyand Yury-Fridlyand deleted the rust/dev_yuryf_unsafe branch May 8, 2025 16:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants