diff options
| author | Nicholas Nethercote <n.nethercote@gmail.com> | 2024-06-20 05:02:12 +1000 |
|---|---|---|
| committer | Nicholas Nethercote <n.nethercote@gmail.com> | 2024-06-20 09:23:18 +1000 |
| commit | 09006d6a88019b80f7158f1a5f754a358751d7f1 (patch) | |
| tree | a0fbba1fc8b928a78b480ae6782ce0c4de625385 /compiler | |
| parent | 894f7a4ba6554d3797404bbf550d9919df060b97 (diff) | |
| download | rust-09006d6a88019b80f7158f1a5f754a358751d7f1.tar.gz rust-09006d6a88019b80f7158f1a5f754a358751d7f1.zip | |
Convert some module-level `//` and `///` comments to `//!`.
This makes their intent and expected location clearer. We see some examples where these comments were not clearly separate from `use` declarations, which made it hard to understand what the comment is describing.
Diffstat (limited to 'compiler')
5 files changed, 12 insertions, 8 deletions
diff --git a/compiler/rustc_builtin_macros/src/test.rs b/compiler/rustc_builtin_macros/src/test.rs index 8f96070d149..c0310a2f4b0 100644 --- a/compiler/rustc_builtin_macros/src/test.rs +++ b/compiler/rustc_builtin_macros/src/test.rs @@ -1,6 +1,7 @@ +//! The expansion from a test function to the appropriate test struct for libtest +//! Ideally, this code would be in libtest but for efficiency and error messages it lives here. + use crate::errors; -/// The expansion from a test function to the appropriate test struct for libtest -/// Ideally, this code would be in libtest but for efficiency and error messages it lives here. use crate::util::{check_builtin_macro_attribute, warn_on_duplicate_attribute}; use rustc_ast::ptr::P; use rustc_ast::{self as ast, attr, GenericParamKind}; diff --git a/compiler/rustc_data_structures/src/base_n.rs b/compiler/rustc_data_structures/src/base_n.rs index aed89fadc4c..80810df14d0 100644 --- a/compiler/rustc_data_structures/src/base_n.rs +++ b/compiler/rustc_data_structures/src/base_n.rs @@ -1,5 +1,6 @@ -/// Converts unsigned integers into a string representation with some base. -/// Bases up to and including 36 can be used for case-insensitive things. +//! Converts unsigned integers into a string representation with some base. +//! Bases up to and including 36 can be used for case-insensitive things. + use std::ascii; use std::fmt; diff --git a/compiler/rustc_middle/src/mir/statement.rs b/compiler/rustc_middle/src/mir/statement.rs index 4d9a931d697..ac3feb71a2b 100644 --- a/compiler/rustc_middle/src/mir/statement.rs +++ b/compiler/rustc_middle/src/mir/statement.rs @@ -1,4 +1,5 @@ -/// Functionality for statements, operands, places, and things that appear in them. +//! Functionality for statements, operands, places, and things that appear in them. + use super::{interpret::GlobalAlloc, *}; /////////////////////////////////////////////////////////////////////////// diff --git a/compiler/rustc_middle/src/mir/terminator.rs b/compiler/rustc_middle/src/mir/terminator.rs index c8c12e205e1..ed592612358 100644 --- a/compiler/rustc_middle/src/mir/terminator.rs +++ b/compiler/rustc_middle/src/mir/terminator.rs @@ -1,4 +1,5 @@ -/// Functionality for terminators and helper types that appear in terminators. +//! Functionality for terminators and helper types that appear in terminators. + use rustc_hir::LangItem; use smallvec::{smallvec, SmallVec}; diff --git a/compiler/rustc_target/src/spec/targets/mips64_openwrt_linux_musl.rs b/compiler/rustc_target/src/spec/targets/mips64_openwrt_linux_musl.rs index b8bdfc943de..9df7b2b670f 100644 --- a/compiler/rustc_target/src/spec/targets/mips64_openwrt_linux_musl.rs +++ b/compiler/rustc_target/src/spec/targets/mips64_openwrt_linux_musl.rs @@ -1,5 +1,5 @@ -/// A target tuple for OpenWrt MIPS64 targets -/// +//! A target tuple for OpenWrt MIPS64 targets. + use crate::abi::Endian; use crate::spec::{base, Target, TargetOptions}; |
