From 4013290508f3aa266ccb04dc4eff1d488f8ca482 Mon Sep 17 00:00:00 2001 From: Heikki Linnakangas Date: Tue, 23 Aug 2022 12:51:49 +0300 Subject: [PATCH] Fix module doc comment. `///` is used for comments on the *next* code that follows, so the comment actually applied to the `use std::collections::BTreeMap;` line that follows. rustfmt complained about that: error: an inner attribute is not permitted following an outer doc comment --> /home/heikki/git-sandbox/neon/libs/utils/src/seqwait_async.rs:7:1 | 5 | /// | --- previous doc comment 6 | 7 | #![warn(missing_docs)] | ^^^^^^^^^^^^^^^^^^^^^^ not permitted following an outer attribute 8 | 9 | use std::collections::BTreeMap; | ------------------------------- 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 | 7 - #![warn(missing_docs)] 7 + #[warn(missing_docs)] | `//!` is the correct syntax for comments that apply to the whole file. --- libs/utils/src/seqwait_async.rs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/libs/utils/src/seqwait_async.rs b/libs/utils/src/seqwait_async.rs index 09138e9dd4..f685e2b569 100644 --- a/libs/utils/src/seqwait_async.rs +++ b/libs/utils/src/seqwait_async.rs @@ -1,8 +1,8 @@ -/// -/// Async version of 'seqwait.rs' -/// -/// NOTE: This is currently unused. If you need this, you'll need to uncomment this in lib.rs. -/// +//! +//! Async version of 'seqwait.rs' +//! +//! NOTE: This is currently unused. If you need this, you'll need to uncomment this in lib.rs. +//! #![warn(missing_docs)]