diff options
| author | Matthias Krüger <matthias.krueger@famsik.de> | 2024-06-20 14:07:04 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-06-20 14:07:04 +0200 |
| commit | ef2e8bfcbfb10d54b8b8a0cdbe509783c7db5023 (patch) | |
| tree | aa2aaa1a9e1624a084668dabcb8dd65313652847 /compiler/rustc_middle/src | |
| parent | 7b91d11abb8883d903cbd09b07e022ede814b89d (diff) | |
| parent | b5a5647ee0f8af226fcc44a3e6b054fc758a785e (diff) | |
Rollup merge of #126717 - nnethercote:rustfmt-use-pre-cleanups, r=jieyouxu
Clean up some comments near `use` declarations #125443 will reformat all `use` declarations in the repository. There are a few edge cases involving comments on `use` declarations that require care. This PR cleans up some clumsy comment cases, taking us a step closer to #125443 being able to merge. r? ``@lqd``
Diffstat (limited to 'compiler/rustc_middle/src')
| -rw-r--r-- | compiler/rustc_middle/src/middle/privacy.rs | 1 | ||||
| -rw-r--r-- | compiler/rustc_middle/src/mir/statement.rs | 3 | ||||
| -rw-r--r-- | compiler/rustc_middle/src/mir/terminator.rs | 3 | ||||
| -rw-r--r-- | compiler/rustc_middle/src/ty/abstract_const.rs | 1 |
4 files changed, 6 insertions, 2 deletions
diff --git a/compiler/rustc_middle/src/middle/privacy.rs b/compiler/rustc_middle/src/middle/privacy.rs index 46520d69e18..4b47b019fd4 100644 --- a/compiler/rustc_middle/src/middle/privacy.rs +++ b/compiler/rustc_middle/src/middle/privacy.rs @@ -1,6 +1,7 @@ //! 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 //! which are available for use externally when compiled as a library. + use crate::ty::{TyCtxt, Visibility}; use rustc_data_structures::fx::{FxIndexMap, IndexEntry}; use rustc_data_structures::stable_hasher::{HashStable, StableHasher}; 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_middle/src/ty/abstract_const.rs b/compiler/rustc_middle/src/ty/abstract_const.rs index 254e1b54481..fa44fbaa059 100644 --- a/compiler/rustc_middle/src/ty/abstract_const.rs +++ b/compiler/rustc_middle/src/ty/abstract_const.rs @@ -1,4 +1,5 @@ //! A subset of a mir body used for const evaluability checking. + use crate::ty::{ self, Const, EarlyBinder, Ty, TyCtxt, TypeFoldable, TypeFolder, TypeSuperFoldable, TypeVisitableExt, |
