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_mir_transform/src | |
| parent | 7b91d11abb8883d903cbd09b07e022ede814b89d (diff) | |
| parent | b5a5647ee0f8af226fcc44a3e6b054fc758a785e (diff) | |
| download | rust-ef2e8bfcbfb10d54b8b8a0cdbe509783c7db5023.tar.gz rust-ef2e8bfcbfb10d54b8b8a0cdbe509783c7db5023.zip | |
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_mir_transform/src')
| -rw-r--r-- | compiler/rustc_mir_transform/src/ctfe_limit.rs | 1 | ||||
| -rw-r--r-- | compiler/rustc_mir_transform/src/inline.rs | 3 | ||||
| -rw-r--r-- | compiler/rustc_mir_transform/src/lint.rs | 1 |
3 files changed, 4 insertions, 1 deletions
diff --git a/compiler/rustc_mir_transform/src/ctfe_limit.rs b/compiler/rustc_mir_transform/src/ctfe_limit.rs index dcc960e1e02..a0dddec185c 100644 --- a/compiler/rustc_mir_transform/src/ctfe_limit.rs +++ b/compiler/rustc_mir_transform/src/ctfe_limit.rs @@ -1,5 +1,6 @@ //! 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. + use crate::MirPass; use rustc_data_structures::graph::dominators::Dominators; diff --git a/compiler/rustc_mir_transform/src/inline.rs b/compiler/rustc_mir_transform/src/inline.rs index d04bb8d302e..32b5d812025 100644 --- a/compiler/rustc_mir_transform/src/inline.rs +++ b/compiler/rustc_mir_transform/src/inline.rs @@ -1,4 +1,5 @@ -//! Inlining pass for MIR functions +//! Inlining pass for MIR functions. + use crate::deref_separator::deref_finder; use rustc_attr::InlineAttr; use rustc_hir::def::DefKind; diff --git a/compiler/rustc_mir_transform/src/lint.rs b/compiler/rustc_mir_transform/src/lint.rs index 5b269185e87..3d1e1e48175 100644 --- a/compiler/rustc_mir_transform/src/lint.rs +++ b/compiler/rustc_mir_transform/src/lint.rs @@ -1,6 +1,7 @@ //! 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 //! can be executed, so it has false positives. + use rustc_data_structures::fx::FxHashSet; use rustc_index::bit_set::BitSet; use rustc_middle::mir::visit::{PlaceContext, Visitor}; |
