mirror of
https://github.com/rust-lang/rust
synced 2024-10-04 15:50:51 +00:00
Add blank lines after module-level //!
comments.
Most modules have such a blank line, but some don't. Inserting the blank line makes it clearer that the `//!` comments are describing the entire module, rather than the `use` declaration(s) that immediately follows.
This commit is contained in:
parent
09006d6a88
commit
665821cb60
|
@ -1,4 +1,5 @@
|
||||||
//! The common code for `tests/lang_tests_*.rs`
|
//! The common code for `tests/lang_tests_*.rs`
|
||||||
|
|
||||||
use std::{
|
use std::{
|
||||||
env::{self, current_dir},
|
env::{self, current_dir},
|
||||||
path::{Path, PathBuf},
|
path::{Path, PathBuf},
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
//! Locals are in a private module as updating `LocalRef::Operand` has to
|
//! Locals are in a private module as updating `LocalRef::Operand` has to
|
||||||
//! be careful wrt to subtyping. To deal with this we only allow updates by using
|
//! be careful wrt to subtyping. To deal with this we only allow updates by using
|
||||||
//! `FunctionCx::overwrite_local` which handles it automatically.
|
//! `FunctionCx::overwrite_local` which handles it automatically.
|
||||||
|
|
||||||
use crate::mir::{FunctionCx, LocalRef};
|
use crate::mir::{FunctionCx, LocalRef};
|
||||||
use crate::traits::BuilderMethods;
|
use crate::traits::BuilderMethods;
|
||||||
use rustc_index::IndexVec;
|
use rustc_index::IndexVec;
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
//! A simple markdown parser that can write formatted text to the terminal
|
//! A simple markdown parser that can write formatted text to the terminal
|
||||||
//!
|
//!
|
||||||
//! Entrypoint is `MdStream::parse_str(...)`
|
//! Entrypoint is `MdStream::parse_str(...)`
|
||||||
|
|
||||||
use std::io;
|
use std::io;
|
||||||
|
|
||||||
use termcolor::{Buffer, BufferWriter, ColorChoice};
|
use termcolor::{Buffer, BufferWriter, ColorChoice};
|
||||||
|
|
|
@ -104,6 +104,7 @@
|
||||||
//! Kleene operators under which a meta-variable is repeating is the concatenation of the stacks
|
//! Kleene operators under which a meta-variable is repeating is the concatenation of the stacks
|
||||||
//! stored when entering a macro definition starting from the state in which the meta-variable is
|
//! stored when entering a macro definition starting from the state in which the meta-variable is
|
||||||
//! bound.
|
//! bound.
|
||||||
|
|
||||||
use crate::errors;
|
use crate::errors;
|
||||||
use crate::mbe::{KleeneToken, TokenTree};
|
use crate::mbe::{KleeneToken, TokenTree};
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
//! Some helper functions for `AutoDeref`
|
//! Some helper functions for `AutoDeref`.
|
||||||
|
|
||||||
use super::method::MethodCallee;
|
use super::method::MethodCallee;
|
||||||
use super::{FnCtxt, PlaceOp};
|
use super::{FnCtxt, PlaceOp};
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
//! Errors emitted by `rustc_hir_typeck`.
|
//! Errors emitted by `rustc_hir_typeck`.
|
||||||
|
|
||||||
use std::borrow::Cow;
|
use std::borrow::Cow;
|
||||||
|
|
||||||
use crate::fluent_generated as fluent;
|
use crate::fluent_generated as fluent;
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
//! A utility module to inspect currently ambiguous obligations in the current context.
|
//! A utility module to inspect currently ambiguous obligations in the current context.
|
||||||
|
|
||||||
use crate::FnCtxt;
|
use crate::FnCtxt;
|
||||||
use rustc_infer::traits::{self, ObligationCause};
|
use rustc_infer::traits::{self, ObligationCause};
|
||||||
use rustc_middle::traits::solve::Goal;
|
use rustc_middle::traits::solve::Goal;
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
//! Error Reporting for Anonymous Region Lifetime Errors
|
//! Error Reporting for Anonymous Region Lifetime Errors
|
||||||
//! where one region is named and the other is anonymous.
|
//! where one region is named and the other is anonymous.
|
||||||
|
|
||||||
use crate::infer::error_reporting::nice_region_error::NiceRegionError;
|
use crate::infer::error_reporting::nice_region_error::NiceRegionError;
|
||||||
use crate::{
|
use crate::{
|
||||||
errors::ExplicitLifetimeRequired,
|
errors::ExplicitLifetimeRequired,
|
||||||
|
|
|
@ -30,6 +30,7 @@
|
||||||
//! solving a set of constraints. In contrast, the type inferencer assigns a value to each type
|
//! solving a set of constraints. In contrast, the type inferencer assigns a value to each type
|
||||||
//! variable only once, and it does so as soon as it can, so it is reasonable to ask what the type
|
//! variable only once, and it does so as soon as it can, so it is reasonable to ask what the type
|
||||||
//! inferencer knows "so far".
|
//! inferencer knows "so far".
|
||||||
|
|
||||||
use super::InferCtxt;
|
use super::InferCtxt;
|
||||||
use rustc_data_structures::fx::FxHashMap;
|
use rustc_data_structures::fx::FxHashMap;
|
||||||
use rustc_middle::bug;
|
use rustc_middle::bug;
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
//! Various code related to computing outlives relations.
|
//! Various code related to computing outlives relations.
|
||||||
|
|
||||||
use self::env::OutlivesEnvironment;
|
use self::env::OutlivesEnvironment;
|
||||||
use super::region_constraints::RegionConstraintData;
|
use super::region_constraints::RegionConstraintData;
|
||||||
use super::{InferCtxt, RegionResolutionError, SubregionOrigin};
|
use super::{InferCtxt, RegionResolutionError, SubregionOrigin};
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
//! A pass that checks to make sure private fields and methods aren't used
|
//! A pass that checks to make sure private fields and methods aren't used
|
||||||
//! outside their scopes. This pass will also generate a set of exported items
|
//! outside their scopes. This pass will also generate a set of exported items
|
||||||
//! which are available for use externally when compiled as a library.
|
//! which are available for use externally when compiled as a library.
|
||||||
|
|
||||||
use crate::ty::{TyCtxt, Visibility};
|
use crate::ty::{TyCtxt, Visibility};
|
||||||
use rustc_data_structures::fx::{FxIndexMap, IndexEntry};
|
use rustc_data_structures::fx::{FxIndexMap, IndexEntry};
|
||||||
use rustc_data_structures::stable_hasher::{HashStable, StableHasher};
|
use rustc_data_structures::stable_hasher::{HashStable, StableHasher};
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
//! A subset of a mir body used for const evaluability checking.
|
//! A subset of a mir body used for const evaluability checking.
|
||||||
|
|
||||||
use crate::ty::{
|
use crate::ty::{
|
||||||
self, Const, EarlyBinder, Ty, TyCtxt, TypeFoldable, TypeFolder, TypeSuperFoldable,
|
self, Const, EarlyBinder, Ty, TyCtxt, TypeFoldable, TypeFolder, TypeSuperFoldable,
|
||||||
TypeVisitableExt,
|
TypeVisitableExt,
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
//! A pass that inserts the `ConstEvalCounter` instruction into any blocks that have a back edge
|
//! A pass that inserts the `ConstEvalCounter` instruction into any blocks that have a back edge
|
||||||
//! (thus indicating there is a loop in the CFG), or whose terminator is a function call.
|
//! (thus indicating there is a loop in the CFG), or whose terminator is a function call.
|
||||||
|
|
||||||
use crate::MirPass;
|
use crate::MirPass;
|
||||||
|
|
||||||
use rustc_data_structures::graph::dominators::Dominators;
|
use rustc_data_structures::graph::dominators::Dominators;
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
//! Inlining pass for MIR functions
|
//! Inlining pass for MIR functions.
|
||||||
|
|
||||||
use crate::deref_separator::deref_finder;
|
use crate::deref_separator::deref_finder;
|
||||||
use rustc_attr::InlineAttr;
|
use rustc_attr::InlineAttr;
|
||||||
use rustc_hir::def::DefKind;
|
use rustc_hir::def::DefKind;
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
//! This pass statically detects code which has undefined behaviour or is likely to be erroneous.
|
//! This pass statically detects code which has undefined behaviour or is likely to be erroneous.
|
||||||
//! It can be used to locate problems in MIR building or optimizations. It assumes that all code
|
//! It can be used to locate problems in MIR building or optimizations. It assumes that all code
|
||||||
//! can be executed, so it has false positives.
|
//! can be executed, so it has false positives.
|
||||||
|
|
||||||
use rustc_data_structures::fx::FxHashSet;
|
use rustc_data_structures::fx::FxHashSet;
|
||||||
use rustc_index::bit_set::BitSet;
|
use rustc_index::bit_set::BitSet;
|
||||||
use rustc_middle::mir::visit::{PlaceContext, Visitor};
|
use rustc_middle::mir::visit::{PlaceContext, Visitor};
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
//! As explained in [`crate::usefulness`], values and patterns are made from constructors applied to
|
//! As explained in [`crate::usefulness`], values and patterns are made from constructors applied to
|
||||||
//! fields. This file defines types that represent patterns in this way.
|
//! fields. This file defines types that represent patterns in this way.
|
||||||
|
|
||||||
use std::fmt;
|
use std::fmt;
|
||||||
|
|
||||||
use smallvec::{smallvec, SmallVec};
|
use smallvec::{smallvec, SmallVec};
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
//! Test the pattern complexity limit.
|
//! Test the pattern complexity limit.
|
||||||
|
|
||||||
use common::*;
|
use common::*;
|
||||||
use rustc_pattern_analysis::{pat::DeconstructedPat, usefulness::PlaceValidity, MatchArm};
|
use rustc_pattern_analysis::{pat::DeconstructedPat, usefulness::PlaceValidity, MatchArm};
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
//! Test exhaustiveness checking.
|
//! Test exhaustiveness checking.
|
||||||
|
|
||||||
use common::*;
|
use common::*;
|
||||||
use rustc_pattern_analysis::{
|
use rustc_pattern_analysis::{
|
||||||
pat::{DeconstructedPat, WitnessPat},
|
pat::{DeconstructedPat, WitnessPat},
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
//! Test the computation of arm intersections.
|
//! Test the computation of arm intersections.
|
||||||
|
|
||||||
use common::*;
|
use common::*;
|
||||||
use rustc_pattern_analysis::{pat::DeconstructedPat, usefulness::PlaceValidity, MatchArm};
|
use rustc_pattern_analysis::{pat::DeconstructedPat, usefulness::PlaceValidity, MatchArm};
|
||||||
|
|
||||||
|
|
|
@ -4,6 +4,7 @@
|
||||||
//!
|
//!
|
||||||
//! For more information about LLVM CFI and cross-language LLVM CFI support for the Rust compiler,
|
//! For more information about LLVM CFI and cross-language LLVM CFI support for the Rust compiler,
|
||||||
//! see design document in the tracking issue #89653.
|
//! see design document in the tracking issue #89653.
|
||||||
|
|
||||||
use rustc_data_structures::base_n::ToBaseN;
|
use rustc_data_structures::base_n::ToBaseN;
|
||||||
use rustc_data_structures::base_n::ALPHANUMERIC_ONLY;
|
use rustc_data_structures::base_n::ALPHANUMERIC_ONLY;
|
||||||
use rustc_data_structures::base_n::CASE_INSENSITIVE;
|
use rustc_data_structures::base_n::CASE_INSENSITIVE;
|
||||||
|
|
|
@ -3,6 +3,7 @@
|
||||||
//!
|
//!
|
||||||
//! For more information about LLVM CFI and cross-language LLVM CFI support for the Rust compiler,
|
//! For more information about LLVM CFI and cross-language LLVM CFI support for the Rust compiler,
|
||||||
//! see design document in the tracking issue #89653.
|
//! see design document in the tracking issue #89653.
|
||||||
|
|
||||||
use rustc_data_structures::fx::FxHashMap;
|
use rustc_data_structures::fx::FxHashMap;
|
||||||
use rustc_middle::bug;
|
use rustc_middle::bug;
|
||||||
use rustc_middle::ty::{self, Instance, Ty, TyCtxt, TypeFoldable};
|
use rustc_middle::ty::{self, Instance, Ty, TyCtxt, TypeFoldable};
|
||||||
|
|
|
@ -3,6 +3,7 @@
|
||||||
//!
|
//!
|
||||||
//! For more information about LLVM CFI and cross-language LLVM CFI support for the Rust compiler,
|
//! For more information about LLVM CFI and cross-language LLVM CFI support for the Rust compiler,
|
||||||
//! see design document in the tracking issue #89653.
|
//! see design document in the tracking issue #89653.
|
||||||
|
|
||||||
use rustc_hir as hir;
|
use rustc_hir as hir;
|
||||||
use rustc_hir::LangItem;
|
use rustc_hir::LangItem;
|
||||||
use rustc_middle::bug;
|
use rustc_middle::bug;
|
||||||
|
|
|
@ -3,6 +3,7 @@
|
||||||
//!
|
//!
|
||||||
//! For more information about LLVM CFI and cross-language LLVM CFI support for the Rust compiler,
|
//! For more information about LLVM CFI and cross-language LLVM CFI support for the Rust compiler,
|
||||||
//! see design document in the tracking issue #89653.
|
//! see design document in the tracking issue #89653.
|
||||||
|
|
||||||
use bitflags::bitflags;
|
use bitflags::bitflags;
|
||||||
use rustc_middle::ty::{Instance, Ty, TyCtxt};
|
use rustc_middle::ty::{Instance, Ty, TyCtxt};
|
||||||
use rustc_target::abi::call::FnAbi;
|
use rustc_target::abi::call::FnAbi;
|
||||||
|
|
|
@ -3,6 +3,7 @@
|
||||||
//!
|
//!
|
||||||
//! For more information about LLVM KCFI and cross-language LLVM KCFI support for the Rust compiler,
|
//! For more information about LLVM KCFI and cross-language LLVM KCFI support for the Rust compiler,
|
||||||
//! see the tracking issue #123479.
|
//! see the tracking issue #123479.
|
||||||
|
|
||||||
use rustc_middle::ty::{Instance, InstanceKind, ReifyReason, Ty, TyCtxt};
|
use rustc_middle::ty::{Instance, InstanceKind, ReifyReason, Ty, TyCtxt};
|
||||||
use rustc_target::abi::call::FnAbi;
|
use rustc_target::abi::call::FnAbi;
|
||||||
use std::hash::Hasher;
|
use std::hash::Hasher;
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
//! Related to out filenames of compilation (e.g. binaries).
|
//! Related to out filenames of compilation (e.g. binaries).
|
||||||
|
|
||||||
use crate::config::{self, CrateType, Input, OutFileName, OutputFilenames, OutputType};
|
use crate::config::{self, CrateType, Input, OutFileName, OutputFilenames, OutputType};
|
||||||
use crate::errors::{
|
use crate::errors::{
|
||||||
self, CrateNameDoesNotMatch, CrateNameEmpty, CrateNameInvalid, FileIsNotWriteable,
|
self, CrateNameDoesNotMatch, CrateNameEmpty, CrateNameInvalid, FileIsNotWriteable,
|
||||||
|
|
|
@ -3,6 +3,7 @@
|
||||||
//! We first retrieve and monomorphize the rustc body representation, i.e., we generate a
|
//! We first retrieve and monomorphize the rustc body representation, i.e., we generate a
|
||||||
//! monomorphic body using internal representation.
|
//! monomorphic body using internal representation.
|
||||||
//! After that, we convert the internal representation into a stable one.
|
//! After that, we convert the internal representation into a stable one.
|
||||||
|
|
||||||
use crate::rustc_smir::{Stable, Tables};
|
use crate::rustc_smir::{Stable, Tables};
|
||||||
use rustc_hir::def::DefKind;
|
use rustc_hir::def::DefKind;
|
||||||
use rustc_middle::mir;
|
use rustc_middle::mir;
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
//! Handle the conversion of different internal errors into a stable version.
|
//! Handle the conversion of different internal errors into a stable version.
|
||||||
//!
|
//!
|
||||||
//! Currently we encode everything as [stable_mir::Error], which is represented as a string.
|
//! Currently we encode everything as [stable_mir::Error], which is represented as a string.
|
||||||
|
|
||||||
use crate::rustc_smir::{Stable, Tables};
|
use crate::rustc_smir::{Stable, Tables};
|
||||||
use rustc_middle::mir::interpret::AllocError;
|
use rustc_middle::mir::interpret::AllocError;
|
||||||
use rustc_middle::ty::layout::LayoutError;
|
use rustc_middle::ty::layout::LayoutError;
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
//! Deeply normalize types using the old trait solver.
|
//! Deeply normalize types using the old trait solver.
|
||||||
|
|
||||||
use super::error_reporting::OverflowCause;
|
use super::error_reporting::OverflowCause;
|
||||||
use super::error_reporting::TypeErrCtxtExt;
|
use super::error_reporting::TypeErrCtxtExt;
|
||||||
use super::SelectionContext;
|
use super::SelectionContext;
|
||||||
|
|
|
@ -6,6 +6,7 @@
|
||||||
//!
|
//!
|
||||||
//! [rustc dev guide]:
|
//! [rustc dev guide]:
|
||||||
//! https://rustc-dev-guide.rust-lang.org/traits/resolution.html#confirmation
|
//! https://rustc-dev-guide.rust-lang.org/traits/resolution.html#confirmation
|
||||||
|
|
||||||
use rustc_ast::Mutability;
|
use rustc_ast::Mutability;
|
||||||
use rustc_data_structures::stack::ensure_sufficient_stack;
|
use rustc_data_structures::stack::ensure_sufficient_stack;
|
||||||
use rustc_hir::lang_items::LangItem;
|
use rustc_hir::lang_items::LangItem;
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
//! This module provides methods to retrieve allocation information, such as static variables.
|
//! This module provides methods to retrieve allocation information, such as static variables.
|
||||||
|
|
||||||
use crate::mir::mono::{Instance, StaticDef};
|
use crate::mir::mono::{Instance, StaticDef};
|
||||||
use crate::target::{Endian, MachineInfo};
|
use crate::target::{Endian, MachineInfo};
|
||||||
use crate::ty::{Allocation, Binder, ExistentialTraitRef, IndexedVal, Ty};
|
use crate::ty::{Allocation, Binder, ExistentialTraitRef, IndexedVal, Ty};
|
||||||
|
|
|
@ -154,6 +154,7 @@
|
||||||
//! }
|
//! }
|
||||||
//! vec.truncate(write_idx);
|
//! vec.truncate(write_idx);
|
||||||
//! ```
|
//! ```
|
||||||
|
|
||||||
use crate::alloc::{handle_alloc_error, Global};
|
use crate::alloc::{handle_alloc_error, Global};
|
||||||
use core::alloc::Allocator;
|
use core::alloc::Allocator;
|
||||||
use core::alloc::Layout;
|
use core::alloc::Layout;
|
||||||
|
|
|
@ -17,6 +17,7 @@
|
||||||
//! Note: Because the term "leading byte" can sometimes be ambiguous (for
|
//! Note: Because the term "leading byte" can sometimes be ambiguous (for
|
||||||
//! example, it could also refer to the first byte of a slice), we'll often use
|
//! example, it could also refer to the first byte of a slice), we'll often use
|
||||||
//! the term "non-continuation byte" to refer to these bytes in the code.
|
//! the term "non-continuation byte" to refer to these bytes in the code.
|
||||||
|
|
||||||
use core::intrinsics::unlikely;
|
use core::intrinsics::unlikely;
|
||||||
|
|
||||||
const USIZE_SIZE: usize = core::mem::size_of::<usize>();
|
const USIZE_SIZE: usize = core::mem::size_of::<usize>();
|
||||||
|
|
|
@ -3,6 +3,7 @@
|
||||||
#[cfg(not(panic = "abort"))]
|
#[cfg(not(panic = "abort"))]
|
||||||
mod drop_checks {
|
mod drop_checks {
|
||||||
//! These tests mainly make sure the elements are correctly dropped.
|
//! These tests mainly make sure the elements are correctly dropped.
|
||||||
|
|
||||||
use std::sync::atomic::{AtomicBool, AtomicUsize, Ordering::SeqCst};
|
use std::sync::atomic::{AtomicBool, AtomicUsize, Ordering::SeqCst};
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug)]
|
||||||
|
|
|
@ -27,6 +27,7 @@
|
||||||
//! standard. That is why they accept wildly diverse inputs or may seem to duplicate other tests.
|
//! standard. That is why they accept wildly diverse inputs or may seem to duplicate other tests.
|
||||||
//! Please consider this carefully when adding, removing, or reorganizing these tests. They are
|
//! Please consider this carefully when adding, removing, or reorganizing these tests. They are
|
||||||
//! here so that it is clear what tests are required by the standard and what can be changed.
|
//! here so that it is clear what tests are required by the standard and what can be changed.
|
||||||
|
|
||||||
use ::core::str::FromStr;
|
use ::core::str::FromStr;
|
||||||
|
|
||||||
// IEEE 754 for many tests is applied to specific bit patterns.
|
// IEEE 754 for many tests is applied to specific bit patterns.
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
//! Unwinding panics for Miri.
|
//! Unwinding panics for Miri.
|
||||||
|
|
||||||
use alloc::boxed::Box;
|
use alloc::boxed::Box;
|
||||||
use core::any::Any;
|
use core::any::Any;
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
//! Assignment operators
|
//! Assignment operators
|
||||||
|
|
||||||
use super::*;
|
use super::*;
|
||||||
use core::ops::{AddAssign, MulAssign}; // commutative binary op-assignment
|
use core::ops::{AddAssign, MulAssign}; // commutative binary op-assignment
|
||||||
use core::ops::{BitAndAssign, BitOrAssign, BitXorAssign}; // commutative bit binary op-assignment
|
use core::ops::{BitAndAssign, BitOrAssign, BitXorAssign}; // commutative bit binary op-assignment
|
||||||
|
|
|
@ -2,6 +2,7 @@
|
||||||
//! Ideally, Rust would take care of this itself,
|
//! Ideally, Rust would take care of this itself,
|
||||||
//! and method calls usually handle the LHS implicitly.
|
//! and method calls usually handle the LHS implicitly.
|
||||||
//! But this is not the case with arithmetic ops.
|
//! But this is not the case with arithmetic ops.
|
||||||
|
|
||||||
use super::*;
|
use super::*;
|
||||||
|
|
||||||
macro_rules! deref_lhs {
|
macro_rules! deref_lhs {
|
||||||
|
|
|
@ -6,6 +6,7 @@
|
||||||
//! outside this crate.
|
//! outside this crate.
|
||||||
//!
|
//!
|
||||||
//! [`collections`]: crate::collections
|
//! [`collections`]: crate::collections
|
||||||
|
|
||||||
#[allow(deprecated)]
|
#[allow(deprecated)]
|
||||||
use super::{BuildHasher, Hasher, SipHasher13};
|
use super::{BuildHasher, Hasher, SipHasher13};
|
||||||
use crate::cell::Cell;
|
use crate::cell::Cell;
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
//! Thread implementation backed by μITRON tasks. Assumes `acre_tsk` and
|
//! Thread implementation backed by μITRON tasks. Assumes `acre_tsk` and
|
||||||
//! `exd_tsk` are available.
|
//! `exd_tsk` are available.
|
||||||
|
|
||||||
use super::{
|
use super::{
|
||||||
abi,
|
abi,
|
||||||
error::{expect_success, expect_success_aborting, ItronError},
|
error::{expect_success, expect_success_aborting, ItronError},
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
//! `solid_fs.h`
|
//! `solid_fs.h`
|
||||||
|
|
||||||
use crate::os::raw::{c_char, c_int, c_uchar};
|
use crate::os::raw::{c_char, c_int, c_uchar};
|
||||||
pub use libc::{
|
pub use libc::{
|
||||||
ino_t, off_t, stat, time_t, O_APPEND, O_CREAT, O_EXCL, O_RDONLY, O_RDWR, O_TRUNC, O_WRONLY,
|
ino_t, off_t, stat, time_t, O_APPEND, O_CREAT, O_EXCL, O_RDONLY, O_RDWR, O_TRUNC, O_WRONLY,
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
//! Emulated wait status for non-Unix #[cfg(unix) platforms
|
//! Emulated wait status for non-Unix #[cfg(unix) platforms
|
||||||
//!
|
//!
|
||||||
//! Separate module to facilitate testing against a real Unix implementation.
|
//! Separate module to facilitate testing against a real Unix implementation.
|
||||||
|
|
||||||
use crate::ffi::c_int;
|
use crate::ffi::c_int;
|
||||||
use crate::fmt;
|
use crate::fmt;
|
||||||
use crate::num::NonZero;
|
use crate::num::NonZero;
|
||||||
|
|
|
@ -475,6 +475,7 @@ mod cgroups {
|
||||||
//! * cgroup v2 in non-standard mountpoints
|
//! * cgroup v2 in non-standard mountpoints
|
||||||
//! * paths containing control characters or spaces, since those would be escaped in procfs
|
//! * paths containing control characters or spaces, since those would be escaped in procfs
|
||||||
//! output and we don't unescape
|
//! output and we don't unescape
|
||||||
|
|
||||||
use crate::borrow::Cow;
|
use crate::borrow::Cow;
|
||||||
use crate::ffi::OsString;
|
use crate::ffi::OsString;
|
||||||
use crate::fs::{try_exists, File};
|
use crate::fs::{try_exists, File};
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
//! POSIX conditional variable implementation based on user-space wait queues.
|
//! POSIX conditional variable implementation based on user-space wait queues.
|
||||||
|
|
||||||
use crate::sys::pal::itron::{
|
use crate::sys::pal::itron::{
|
||||||
abi, error::expect_success_aborting, spin::SpinMutex, task, time::with_tmos_strong,
|
abi, error::expect_success_aborting, spin::SpinMutex, task, time::with_tmos_strong,
|
||||||
};
|
};
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
//! Mutex implementation backed by μITRON mutexes. Assumes `acre_mtx` and
|
//! Mutex implementation backed by μITRON mutexes. Assumes `acre_mtx` and
|
||||||
//! `TA_INHERIT` are available.
|
//! `TA_INHERIT` are available.
|
||||||
|
|
||||||
use crate::sys::pal::itron::{
|
use crate::sys::pal::itron::{
|
||||||
abi,
|
abi,
|
||||||
error::{expect_success, expect_success_aborting, fail, ItronError},
|
error::{expect_success, expect_success_aborting, fail, ItronError},
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
//! A readers-writer lock implementation backed by the SOLID kernel extension.
|
//! A readers-writer lock implementation backed by the SOLID kernel extension.
|
||||||
|
|
||||||
use crate::sys::pal::{
|
use crate::sys::pal::{
|
||||||
abi,
|
abi,
|
||||||
itron::{
|
itron::{
|
||||||
|
|
|
@ -2,6 +2,7 @@
|
||||||
|
|
||||||
//! Note that this test changes the current directory so
|
//! Note that this test changes the current directory so
|
||||||
//! should not be in the same process as other tests.
|
//! should not be in the same process as other tests.
|
||||||
|
|
||||||
use std::env;
|
use std::env;
|
||||||
use std::fs;
|
use std::fs;
|
||||||
use std::path::{Path, PathBuf};
|
use std::path::{Path, PathBuf};
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
//! Benchmarking module.
|
//! Benchmarking module.
|
||||||
|
|
||||||
use super::{
|
use super::{
|
||||||
event::CompletedTest,
|
event::CompletedTest,
|
||||||
options::BenchMode,
|
options::BenchMode,
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
//! Helper module which helps to determine amount of threads to be used
|
//! Helper module which helps to determine amount of threads to be used
|
||||||
//! during tests execution.
|
//! during tests execution.
|
||||||
|
|
||||||
use std::{env, num::NonZero, thread};
|
use std::{env, num::NonZero, thread};
|
||||||
|
|
||||||
pub fn get_concurrency() -> usize {
|
pub fn get_concurrency() -> usize {
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
//! Benchmark metrics.
|
//! Benchmark metrics.
|
||||||
|
|
||||||
use std::collections::BTreeMap;
|
use std::collections::BTreeMap;
|
||||||
|
|
||||||
#[derive(Clone, PartialEq, Debug, Copy)]
|
#[derive(Clone, PartialEq, Debug, Copy)]
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
//! Calculates information used for the --show-coverage flag.
|
//! Calculates information used for the --show-coverage flag.
|
||||||
|
|
||||||
use crate::clean;
|
use crate::clean;
|
||||||
use crate::core::DocContext;
|
use crate::core::DocContext;
|
||||||
use crate::html::markdown::{find_testable_code, ErrorCodes};
|
use crate::html::markdown::{find_testable_code, ErrorCodes};
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
//! Collects trait impls for each item in the crate. For example, if a crate
|
//! Collects trait impls for each item in the crate. For example, if a crate
|
||||||
//! defines a struct that implements a trait, this pass will note that the
|
//! defines a struct that implements a trait, this pass will note that the
|
||||||
//! struct implements that trait.
|
//! struct implements that trait.
|
||||||
|
|
||||||
use super::Pass;
|
use super::Pass;
|
||||||
use crate::clean::*;
|
use crate::clean::*;
|
||||||
use crate::core::DocContext;
|
use crate::core::DocContext;
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
//! Validates syntax inside Rust code blocks (\`\`\`rust).
|
//! Validates syntax inside Rust code blocks (\`\`\`rust).
|
||||||
|
|
||||||
use rustc_data_structures::sync::{Lock, Lrc};
|
use rustc_data_structures::sync::{Lock, Lrc};
|
||||||
use rustc_errors::{
|
use rustc_errors::{
|
||||||
emitter::Emitter,
|
emitter::Emitter,
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
//! Detects invalid HTML (like an unclosed `<span>`) in doc comments.
|
//! Detects invalid HTML (like an unclosed `<span>`) in doc comments.
|
||||||
|
|
||||||
use crate::clean::*;
|
use crate::clean::*;
|
||||||
use crate::core::DocContext;
|
use crate::core::DocContext;
|
||||||
use crate::html::markdown::main_body_opts;
|
use crate::html::markdown::main_body_opts;
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
//! Propagates [`#[doc(cfg(...))]`](https://github.com/rust-lang/rust/issues/43781) to child items.
|
//! Propagates [`#[doc(cfg(...))]`](https://github.com/rust-lang/rust/issues/43781) to child items.
|
||||||
|
|
||||||
use std::sync::Arc;
|
use std::sync::Arc;
|
||||||
|
|
||||||
use crate::clean::cfg::Cfg;
|
use crate::clean::cfg::Cfg;
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
//! Strips all private import statements (use, extern crate) from a
|
//! Strips all private import statements (use, extern crate) from a
|
||||||
//! crate.
|
//! crate.
|
||||||
|
|
||||||
use crate::clean;
|
use crate::clean;
|
||||||
use crate::core::DocContext;
|
use crate::core::DocContext;
|
||||||
use crate::fold::DocFolder;
|
use crate::fold::DocFolder;
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
//! Strip all private items from the output. Additionally implies strip_priv_imports.
|
//! Strip all private items from the output. Additionally implies strip_priv_imports.
|
||||||
//! Basically, the goal is to remove items that are not relevant for public documentation.
|
//! Basically, the goal is to remove items that are not relevant for public documentation.
|
||||||
|
|
||||||
use crate::clean::{self, ItemIdSet};
|
use crate::clean::{self, ItemIdSet};
|
||||||
use crate::core::DocContext;
|
use crate::core::DocContext;
|
||||||
use crate::fold::DocFolder;
|
use crate::fold::DocFolder;
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
//! A collection of utility functions for the `strip_*` passes.
|
//! A collection of utility functions for the `strip_*` passes.
|
||||||
|
|
||||||
use rustc_hir::def_id::DefId;
|
use rustc_hir::def_id::DefId;
|
||||||
use rustc_middle::ty::{TyCtxt, Visibility};
|
use rustc_middle::ty::{TyCtxt, Visibility};
|
||||||
use std::mem;
|
use std::mem;
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
//! Tidy check to ensure below in UI test directories:
|
//! Tidy check to ensure below in UI test directories:
|
||||||
//! - the number of entries in each directory must be less than `ENTRY_LIMIT`
|
//! - the number of entries in each directory must be less than `ENTRY_LIMIT`
|
||||||
//! - there are no stray `.stderr` files
|
//! - there are no stray `.stderr` files
|
||||||
|
|
||||||
use ignore::Walk;
|
use ignore::Walk;
|
||||||
use std::collections::{BTreeSet, HashMap};
|
use std::collections::{BTreeSet, HashMap};
|
||||||
use std::ffi::OsStr;
|
use std::ffi::OsStr;
|
||||||
|
|
Loading…
Reference in a new issue