about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorOliver Scherer <github35764891676564198441@oli-obk.de>2020-08-20 16:56:19 +0200
committerGitHub <noreply@github.com>2020-08-20 16:56:19 +0200
commitdcc202723a10612061b3c55cdbad0c2d63f2b712 (patch)
treea3d558f8ee1a5c352b32647be3f105338d2a48cc /src
parentf0bae6726f3b68ec80cabcb3fa66e460b715eb0b (diff)
downloadrust-dcc202723a10612061b3c55cdbad0c2d63f2b712.tar.gz
rust-dcc202723a10612061b3c55cdbad0c2d63f2b712.zip
Apply suggestions from code review
Co-authored-by: Wesley Wiser <wwiser@gmail.com>
Diffstat (limited to 'src')
-rw-r--r--src/librustc_middle/mir/mod.rs4
-rw-r--r--src/librustc_mir/transform/const_prop.rs2
2 files changed, 3 insertions, 3 deletions
diff --git a/src/librustc_middle/mir/mod.rs b/src/librustc_middle/mir/mod.rs
index 45b39c2fb67..24e0376d226 100644
--- a/src/librustc_middle/mir/mod.rs
+++ b/src/librustc_middle/mir/mod.rs
@@ -77,14 +77,14 @@ impl<'tcx> HasLocalDecls<'tcx> for Body<'tcx> {
 /// dialects forbid certain variants or values in certain phases.
 ///
 /// Note: Each phase's validation checks all invariants of the *previous* phases' dialects. A phase
-/// that changes the dialect documents what invariants must be uphelpd *after* that phase finishes.
+/// that changes the dialect documents what invariants must be upheld *after* that phase finishes.
 ///
 /// Warning: ordering of variants is significant.
 #[derive(Copy, Clone, TyEncodable, TyDecodable, Debug, PartialEq, Eq, PartialOrd, Ord)]
 #[derive(HashStable)]
 pub enum MirPhase {
     Build = 0,
-    // FIXME: it's unclear whether we still need this phase (and its corresponding query).
+    // FIXME(oli-obk): it's unclear whether we still need this phase (and its corresponding query).
     // We used to have this for pre-miri MIR based const eval.
     Const = 1,
     /// This phase checks the MIR for promotable elements and takes them out of the main MIR body
diff --git a/src/librustc_mir/transform/const_prop.rs b/src/librustc_mir/transform/const_prop.rs
index 4c79c8f28a8..56479b047fa 100644
--- a/src/librustc_mir/transform/const_prop.rs
+++ b/src/librustc_mir/transform/const_prop.rs
@@ -857,7 +857,7 @@ impl<'mir, 'tcx> ConstPropagator<'mir, 'tcx> {
 
                             if let Some(Some(alloc)) = alloc {
                                 // Assign entire constant in a single statement.
-                                // We can't use aggregates, as we are post-aggregate-lowering.
+                                // We can't use aggregates, as we run after the aggregate-lowering `MirPhase`.
                                 *rval = Rvalue::Use(Operand::Constant(Box::new(Constant {
                                     span: source_info.span,
                                     user_ty: None,