Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: fix incorrect inner doc comments #534

Merged
merged 1 commit into from
Jul 15, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion crates/mun_abi/src/primitive.rs
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
3 changes: 2 additions & 1 deletion crates/mun_codegen/src/value/mod.rs
Original file line number Diff line number Diff line change
@@ -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;
Expand Down
2 changes: 1 addition & 1 deletion crates/mun_compiler/src/lib.rs
Original file line number Diff line number Diff line change
@@ -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;
Expand Down
3 changes: 2 additions & 1 deletion crates/mun_diagnostics/src/hir.rs
Original file line number Diff line number Diff line change
@@ -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;
Expand Down
14 changes: 7 additions & 7 deletions crates/mun_diagnostics/src/lib.rs
Original file line number Diff line number Diff line change
@@ -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 {
Expand Down
13 changes: 7 additions & 6 deletions crates/mun_syntax/src/parsing/event.rs
Original file line number Diff line number Diff line change
@@ -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::{
Expand Down
5 changes: 3 additions & 2 deletions crates/mun_target/src/abi/align.rs
Original file line number Diff line number Diff line change
@@ -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).
Expand Down
4 changes: 2 additions & 2 deletions crates/mun_target/src/abi/integer.rs
Original file line number Diff line number Diff line change
@@ -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};

Expand Down
5 changes: 3 additions & 2 deletions crates/mun_target/src/abi/mod.rs
Original file line number Diff line number Diff line change
@@ -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;
Expand Down
5 changes: 3 additions & 2 deletions crates/mun_target/src/abi/size.rs
Original file line number Diff line number Diff line change
@@ -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};
Expand Down
5 changes: 3 additions & 2 deletions crates/mun_vfs/src/monitor.rs
Original file line number Diff line number Diff line change
@@ -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;
Expand Down
Loading