Skip to content

Commit

Permalink
Enable documentation for set_thread_id.
Browse files Browse the repository at this point in the history
  • Loading branch information
sunfishcode committed Aug 27, 2023
1 parent 43a57e1 commit 6fdfd74
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 0 deletions.
4 changes: 4 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -81,3 +81,7 @@ external-start = ["rustix/use-explicitly-provided-auxv", "rustix/runtime"]

# Disable logging.
max_level_off = ["log/max_level_off"]

[package.metadata.docs.rs]
features = ["set_thread_id"]
rustdoc-args = ["--cfg", "doc_cfg"]
1 change: 1 addition & 0 deletions src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#![doc = include_str!("../README.md")]
#![deny(missing_docs)]
#![cfg_attr(doc_cfg, feature(doc_cfg))]
#![feature(asm_const)]
#![feature(naked_functions)]
#![feature(link_llvm_intrinsics)]
Expand Down
1 change: 1 addition & 0 deletions src/threads.rs
Original file line number Diff line number Diff line change
Expand Up @@ -232,6 +232,7 @@ pub fn current_thread_id() -> ThreadId {
/// threads are created. `tid` must be the same value as what [`gettid`] would
/// return.
#[cfg(feature = "set_thread_id")]
#[cfg_attr(doc_cfg, doc(cfg(feature = "set_thread_id")))]
#[doc(hidden)]
#[inline]
pub unsafe fn set_current_thread_id_after_a_fork(tid: ThreadId) {
Expand Down

0 comments on commit 6fdfd74

Please sign in to comment.