]> git.lizzy.rs Git - rust.git/commitdiff
Apply suggestions from code review
authorOliver Scherer <github35764891676564198441@oli-obk.de>
Thu, 20 Aug 2020 14:56:19 +0000 (16:56 +0200)
committerGitHub <noreply@github.com>
Thu, 20 Aug 2020 14:56:19 +0000 (16:56 +0200)
Co-authored-by: Wesley Wiser <wwiser@gmail.com>
src/librustc_middle/mir/mod.rs
src/librustc_mir/transform/const_prop.rs

index 45b39c2fb67cacc1979e3c1ea27ee4a7162921af..24e0376d226f17b6ffd99ba9a34cadc8fda0c27c 100644 (file)
@@ -77,14 +77,14 @@ fn local_decls(&self) -> &LocalDecls<'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
index 4c79c8f28a81193274fe45c514a0f1a750504dd5..56479b047fa38f437461231394b9fbdc9f82e104 100644 (file)
@@ -857,7 +857,7 @@ fn replace_with_const(
 
                             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,