Skip to content

Commit

Permalink
Merge pull request #78 from dtolnay/unsafeop
Browse files Browse the repository at this point in the history
Turn on deny(unsafe_op_in_unsafe_fn)
  • Loading branch information
dtolnay authored Dec 21, 2023
2 parents 9648b78 + a5f2de3 commit 6592a8b
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 1 deletion.
4 changes: 3 additions & 1 deletion impl/src/element.rs
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,9 @@ fn do_expand(path: Path, pos: Option<usize>, input: Element) -> TokenStream {
#[allow(clippy::no_effect_underscore_binding)]
unsafe fn __typecheck(_: #linkme_path::__private::Void) {
let #new = #linkme_path::__private::value::<#ty>;
#linkme_path::DistributedSlice::private_typecheck(#path, #uninit)
unsafe {
#linkme_path::DistributedSlice::private_typecheck(#path, #uninit);
}
}

#expr
Expand Down
1 change: 1 addition & 0 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,7 @@
#![no_std]
#![doc(html_root_url = "https://docs.rs/linkme/0.3.19")]
#![deny(unsafe_op_in_unsafe_fn)]
#![allow(
clippy::doc_markdown,
clippy::empty_enum,
Expand Down
1 change: 1 addition & 0 deletions tests/distributed_slice.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#![cfg_attr(feature = "used_linker", feature(used_with_arg))]
#![deny(unsafe_op_in_unsafe_fn)]

use linkme::distributed_slice;
use once_cell::sync::Lazy;
Expand Down

0 comments on commit 6592a8b

Please sign in to comment.