Convert some module-level `//` and `///` comments to `//!`. · model-checking/verify-rust-std@4e67110

File tree

4 files changed

lines changed

  • portable-simd/crates/core_simd/examples

4 files changed

lines changed

Original file line numberDiff line numberDiff line change

@@ -1,6 +1,7 @@

1-

// Based on

2-

// https://github.com/matthieu-m/rfc2580/blob/b58d1d3cba0d4b5e859d3617ea2d0943aaa31329/examples/thin.rs

3-

// by matthieu-m

1+

//! Based on

2+

//! <https://github.com/matthieu-m/rfc2580/blob/b58d1d3cba0d4b5e859d3617ea2d0943aaa31329/examples/thin.rs>

3+

//! by matthieu-m

4+
45

use crate::alloc::{self, Layout, LayoutError};

56

use core::error::Error;

67

use core::fmt::{self, Debug, Display, Formatter};

Original file line numberDiff line numberDiff line change

@@ -1,6 +1,5 @@

1-

// Code taken from the `packed_simd` crate

2-

// Run this code with `cargo test --example dot_product`

3-

//use std::iter::zip;

1+

//! Code taken from the `packed_simd` crate.

2+

//! Run this code with `cargo test --example dot_product`.

43
54

#![feature(array_chunks)]

65

#![feature(slice_as_chunks)]

Original file line numberDiff line numberDiff line change

@@ -1,13 +1,14 @@

1-

///! An encapsulation of `BufReader`'s buffer management logic.

2-

///

3-

/// This module factors out the basic functionality of `BufReader` in order to protect two core

4-

/// invariants:

5-

/// * `filled` bytes of `buf` are always initialized

6-

/// * `pos` is always <= `filled`

7-

/// Since this module encapsulates the buffer management logic, we can ensure that the range

8-

/// `pos..filled` is always a valid index into the initialized region of the buffer. This means

9-

/// that user code which wants to do reads from a `BufReader` via `buffer` + `consume` can do so

10-

/// without encountering any runtime bounds checks.

1+

//! An encapsulation of `BufReader`'s buffer management logic.

2+

//!

3+

//! This module factors out the basic functionality of `BufReader` in order to protect two core

4+

//! invariants:

5+

//! * `filled` bytes of `buf` are always initialized

6+

//! * `pos` is always <= `filled`

7+

//! Since this module encapsulates the buffer management logic, we can ensure that the range

8+

//! `pos..filled` is always a valid index into the initialized region of the buffer. This means

9+

//! that user code which wants to do reads from a `BufReader` via `buffer` + `consume` can do so

10+

//! without encountering any runtime bounds checks.

11+
1112

use crate::cmp;

1213

use crate::io::{self, BorrowedBuf, Read};

1314

use crate::mem::MaybeUninit;

Original file line numberDiff line numberDiff line change

@@ -1,5 +1,6 @@

1-

/// The underlying OsString/OsStr implementation on Windows is a

2-

/// wrapper around the "WTF-8" encoding; see the `wtf8` module for more.

1+

//! The underlying OsString/OsStr implementation on Windows is a

2+

//! wrapper around the "WTF-8" encoding; see the `wtf8` module for more.

3+
34

use crate::borrow::Cow;

45

use crate::collections::TryReserveError;

56

use crate::fmt;