about summary refs log tree commit diff
diff options
context:
space:
mode:
authorMazdak Farrokhzad <twingoow@gmail.com>2019-04-22 20:35:00 +0200
committerMatthew Jasper <mjjasper1@gmail.com>2019-05-21 19:37:39 +0100
commit015a45156f7ae9c1c0af86795409d892832aaa71 (patch)
tree9f2eefb72e745fcffdcbd95345d65dbf359c3040
parent2420d82a7c55432071a2094dac29dfe96f303dfe (diff)
downloadrust-015a45156f7ae9c1c0af86795409d892832aaa71.tar.gz
rust-015a45156f7ae9c1c0af86795409d892832aaa71.zip
Comment style fixes
Co-Authored-By: matthewjasper <mjjasper1@gmail.com>
-rw-r--r--src/librustc_mir/build/expr/as_temp.rs4
-rw-r--r--src/librustc_mir/build/scope.rs2
2 files changed, 3 insertions, 3 deletions
diff --git a/src/librustc_mir/build/expr/as_temp.rs b/src/librustc_mir/build/expr/as_temp.rs
index ac70bf30e45..cffd8fb2892 100644
--- a/src/librustc_mir/build/expr/as_temp.rs
+++ b/src/librustc_mir/build/expr/as_temp.rs
@@ -75,8 +75,8 @@ impl<'a, 'gcx, 'tcx> Builder<'a, 'gcx, 'tcx> {
                 },
             );
 
-            // In constants, temp_lifetime is None for temporaries that live for the
-            // 'static lifetime. Thus we do not drop these temporaries and simply leak them.
+            // In constants, `temp_lifetime` is `None` for temporaries that live for the
+            // `'static` lifetime. Thus we do not drop these temporaries and simply leak them.
             // This is equivalent to what `let x = &foo();` does in functions. The temporary
             // is lifted to their surrounding scope. In a function that means the temporary lives
             // until just before the function returns. In constants that means it outlives the
diff --git a/src/librustc_mir/build/scope.rs b/src/librustc_mir/build/scope.rs
index 0d1d40a8af6..34df40ae180 100644
--- a/src/librustc_mir/build/scope.rs
+++ b/src/librustc_mir/build/scope.rs
@@ -900,7 +900,7 @@ impl<'a, 'gcx, 'tcx> Builder<'a, 'gcx, 'tcx> {
     /// * The variable must be in that scope.
     /// * The variable must be at the top of that scope: it's the next thing
     ///   scheduled to drop.
-    /// * The drop must be of DropKind::Storage.
+    /// * The drop must be of `DropKind::Storage`.
     ///
     /// This is used for the boolean holding the result of the match guard. We
     /// do this because: