From: Ralf Jung Date: Mon, 6 Jan 2020 10:35:55 +0000 (+0100) Subject: adjust Deref comment X-Git-Url: https://git.lizzy.rs/?a=commitdiff_plain;h=c781d15da32bf82977311af6f056ee2fc3506bda;p=rust.git adjust Deref comment --- diff --git a/src/librustc_mir/interpret/validity.rs b/src/librustc_mir/interpret/validity.rs index 9f713dfd5e6..ec9ac52a87c 100644 --- a/src/librustc_mir/interpret/validity.rs +++ b/src/librustc_mir/interpret/validity.rs @@ -114,13 +114,11 @@ fn write_path(out: &mut String, path: &Vec) { ClosureVar(name) => write!(out, ".", 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, ".") - } + // `.` 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, "."), Tag => write!(out, "."), DynDowncast => write!(out, "."), }