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

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

Draft
wants to merge 5 commits into
base: rust/integ_yuryf_unsafe
Choose a base branch
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

java/src/lib.rs Outdated Show resolved Hide resolved
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants