Skip to content

Commit 4fdbdd6

Browse files
committed
rust: condvar: avoid pub in example
The future move of pin-init to `syn` uncovers the following unreachable public item in an example: error: unreachable `pub` item --> rust/doctests_kernel_generated.rs:14683:1 | 14683 | pub struct Example { | ---^^^^^^^^^^^^^^^ | | | help: consider restricting its visibility: `pub(crate)` | = help: or consider exporting it for use by other crates = note: `-D unreachable-pub` implied by `-D warnings` = help: to override `-D warnings` add `#[allow(unreachable_pub)]` There is no real downside of keeping the example as-is until the `syn`-based pin-init is introduced, so there is no need to treat it as a fix nor to backport it. However, we still need to change it before introducing the new pin-init. Thus do so. Signed-off-by: Miguel Ojeda <ojeda@kernel.org>
1 parent d54f03d commit 4fdbdd6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

rust/kernel/sync/condvar.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ pub use new_condvar;
4646
/// use kernel::sync::{new_condvar, new_mutex, CondVar, Mutex};
4747
///
4848
/// #[pin_data]
49-
/// pub struct Example {
49+
/// struct Example {
5050
/// #[pin]
5151
/// value: Mutex<u32>,
5252
///

0 commit comments

Comments
 (0)