From 93219dab0a51dfe012d7505ead062a76a1ff86cc Mon Sep 17 00:00:00 2001 From: wackbyte Date: Fri, 14 Jul 2023 19:07:14 -0400 Subject: [PATCH] docs: fix incorrect inner doc comments Replaces `///!` with `//!`. --- crates/mun_abi/src/primitive.rs | 3 ++- crates/mun_codegen/src/value/mod.rs | 3 ++- crates/mun_compiler/src/lib.rs | 2 +- crates/mun_diagnostics/src/hir.rs | 3 ++- crates/mun_diagnostics/src/lib.rs | 14 +++++++------- crates/mun_syntax/src/parsing/event.rs | 13 +++++++------ crates/mun_target/src/abi/align.rs | 5 +++-- crates/mun_target/src/abi/integer.rs | 4 ++-- crates/mun_target/src/abi/mod.rs | 5 +++-- crates/mun_target/src/abi/size.rs | 5 +++-- crates/mun_vfs/src/monitor.rs | 5 +++-- 11 files changed, 35 insertions(+), 27 deletions(-) diff --git a/crates/mun_abi/src/primitive.rs b/crates/mun_abi/src/primitive.rs index 79ccb5342..222a306ae 100644 --- a/crates/mun_abi/src/primitive.rs +++ b/crates/mun_abi/src/primitive.rs @@ -1,4 +1,5 @@ -///! A module that defines information for built-in (or primitive) types. +//! A module that defines information for built-in (or primitive) types. + use crate::{Guid, HasStaticTypeId, TypeId}; /// Defines functions for built-in types like f32, i32, etc. diff --git a/crates/mun_codegen/src/value/mod.rs b/crates/mun_codegen/src/value/mod.rs index fa80b10f8..14a6ff692 100644 --- a/crates/mun_codegen/src/value/mod.rs +++ b/crates/mun_codegen/src/value/mod.rs @@ -1,4 +1,5 @@ -///! This module provides constructs to enable type safe handling of inkwell types. +//! This module provides constructs to enable type safe handling of inkwell types. + mod array_value; mod float_value; mod function_value; diff --git a/crates/mun_compiler/src/lib.rs b/crates/mun_compiler/src/lib.rs index 6b1af2991..8ebecbaab 100644 --- a/crates/mun_compiler/src/lib.rs +++ b/crates/mun_compiler/src/lib.rs @@ -1,7 +1,7 @@ +//! This library contains the code required to go from source code to binaries. #![allow(clippy::enum_variant_names)] // This is a HACK because we use salsa mod db; -///! This library contains the code required to go from source code to binaries. pub mod diagnostics; mod diagnostics_snippets; mod driver; diff --git a/crates/mun_diagnostics/src/hir.rs b/crates/mun_diagnostics/src/hir.rs index 32c037d25..b96716483 100644 --- a/crates/mun_diagnostics/src/hir.rs +++ b/crates/mun_diagnostics/src/hir.rs @@ -1,4 +1,5 @@ -///! This module provides conversion from a `mun_hir::Diagnostics` to a `crate::Diagnostics`. +//! This module provides conversion from a `mun_hir::Diagnostics` to a `crate::Diagnostics`. + mod access_unknown_field; mod duplicate_definition_error; mod expected_function; diff --git a/crates/mun_diagnostics/src/lib.rs b/crates/mun_diagnostics/src/lib.rs index 3efe5fd98..9055e646f 100644 --- a/crates/mun_diagnostics/src/lib.rs +++ b/crates/mun_diagnostics/src/lib.rs @@ -1,15 +1,15 @@ +//! This crate provides in-depth human-readable diagnostic information and fixes for compiler +//! errors that can be shared between the compiler and the language server. +//! +//! The processing of diagnostics into human-readable is separated from the machine-readable +//! diagnostics in for instance the HIR crate for performance reasons. This enables lazily querying +//! the system for more information only when required. + mod hir; use mun_hir::InFile; use mun_syntax::TextRange; -///! This crate provides in-depth human-readable diagnostic information and fixes for compiler -///! errors that can be shared between the compiler and the language server. -///! -///! The processing of diagnostics into human-readable is separated from the machine-readable -///! diagnostics in for instance the HIR crate for performance reasons. This enables lazily querying -///! the system for more information only when required. - /// An annotation within the source code #[derive(Debug, Clone, Eq, PartialEq)] pub struct SourceAnnotation { diff --git a/crates/mun_syntax/src/parsing/event.rs b/crates/mun_syntax/src/parsing/event.rs index d8ea5891e..cde48cfc3 100644 --- a/crates/mun_syntax/src/parsing/event.rs +++ b/crates/mun_syntax/src/parsing/event.rs @@ -1,9 +1,10 @@ -///! It is intended to be completely decoupled from the parser, so as to allow to evolve the tree -/// representation and the parser algorithm independently. -///! -///! The `TreeSink` trait is the bridge between the parser and the tree builder: the parses -///! produces a stream of events like `start node`, `finish node` and `TreeSink` converts -///! this stream to a real tree. +//! It is intended to be completely decoupled from the parser, so as to allow to evolve the tree +//! representation and the parser algorithm independently. +//! +//! The `TreeSink` trait is the bridge between the parser and the tree builder: the parses +//! produces a stream of events like `start node`, `finish node` and `TreeSink` converts +//! this stream to a real tree. + use std::mem; use crate::{ diff --git a/crates/mun_target/src/abi/align.rs b/crates/mun_target/src/abi/align.rs index 67bddd741..8599c1c46 100644 --- a/crates/mun_target/src/abi/align.rs +++ b/crates/mun_target/src/abi/align.rs @@ -1,5 +1,6 @@ -///! Taken from the -///! [librustc_target](https://github.com/rust-lang/rust/tree/master/src/librustc_target) crate. +//! Taken from the +//! [librustc_target](https://github.com/rust-lang/rust/tree/master/src/librustc_target) crate. + use super::Size; /// Alignment of a type in bytes (always a power of two). diff --git a/crates/mun_target/src/abi/integer.rs b/crates/mun_target/src/abi/integer.rs index 4c9a03751..fe634f09e 100644 --- a/crates/mun_target/src/abi/integer.rs +++ b/crates/mun_target/src/abi/integer.rs @@ -1,5 +1,5 @@ -///! Taken from the -///! [librustc_target](https://github.com/rust-lang/rust/tree/master/src/librustc_target) crate. +//! Taken from the +//! [librustc_target](https://github.com/rust-lang/rust/tree/master/src/librustc_target) crate. // use crate::abi::{AbiAndPrefAlign, Align, HasDataLayout, Size}; diff --git a/crates/mun_target/src/abi/mod.rs b/crates/mun_target/src/abi/mod.rs index 6f898a627..bfed04fca 100644 --- a/crates/mun_target/src/abi/mod.rs +++ b/crates/mun_target/src/abi/mod.rs @@ -1,5 +1,6 @@ -///! Taken from the -///! [librustc_target](https://github.com/rust-lang/rust/tree/master/src/librustc_target) crate. +//! Taken from the +//! [librustc_target](https://github.com/rust-lang/rust/tree/master/src/librustc_target) crate. + mod align; mod integer; mod size; diff --git a/crates/mun_target/src/abi/size.rs b/crates/mun_target/src/abi/size.rs index 79dd351ea..f1dd9697d 100644 --- a/crates/mun_target/src/abi/size.rs +++ b/crates/mun_target/src/abi/size.rs @@ -1,5 +1,6 @@ -///! Taken from the -///! [librustc_target](https://github.com/rust-lang/rust/tree/master/src/librustc_target) crate. +//! Taken from the +//! [librustc_target](https://github.com/rust-lang/rust/tree/master/src/librustc_target) crate. + // use crate::abi::{Align, HasDataLayout}; use std::convert::TryInto; // use std::ops::{Add, AddAssign, Mul, Sub}; diff --git a/crates/mun_vfs/src/monitor.rs b/crates/mun_vfs/src/monitor.rs index 6377348b1..304b03eb6 100644 --- a/crates/mun_vfs/src/monitor.rs +++ b/crates/mun_vfs/src/monitor.rs @@ -1,5 +1,6 @@ -///! A monitor is a trait that reads and monitors files in a given set of directories. Changes are -///! read to memory and communicated. +//! A monitor is a trait that reads and monitors files in a given set of directories. Changes are +//! read to memory and communicated. + mod notify_monitor; pub use notify_monitor::NotifyMonitor;