]> git.lizzy.rs Git - rust.git/commitdiff
adjust Deref comment
authorRalf Jung <post@ralfj.de>
Mon, 6 Jan 2020 10:35:55 +0000 (11:35 +0100)
committerRalf Jung <post@ralfj.de>
Thu, 16 Jan 2020 17:57:59 +0000 (18:57 +0100)
src/librustc_mir/interpret/validity.rs

index 9f713dfd5e6078dfae48fa93a1f2dcea9381340d..ec9ac52a87c3af44a3104500f62ca0f11f2b1884 100644 (file)
@@ -114,13 +114,11 @@ fn write_path(out: &mut String, path: &Vec<PathElem>) {
             ClosureVar(name) => write!(out, ".<closure-var({})>", name),
             TupleElem(idx) => write!(out, ".{}", idx),
             ArrayElem(idx) => write!(out, "[{}]", idx),
-            Deref => {
-                // This does not match Rust syntax, but it is more readable for long paths -- and
-                // some of the other items here also are not Rust syntax.  Actually we can't
-                // even use the usual syntax because we are just showing the projections,
-                // not the root.
-                write!(out, ".<deref>")
-            }
+            // `.<deref>` does not match Rust syntax, but it is more readable for long paths -- and
+            // some of the other items here also are not Rust syntax.  Actually we can't
+            // even use the usual syntax because we are just showing the projections,
+            // not the root.
+            Deref => write!(out, ".<deref>"),
             Tag => write!(out, ".<enum-tag>"),
             DynDowncast => write!(out, ".<dyn-downcast>"),
         }