Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 8d074cd

Browse files
authoredMar 23, 2020
Rollup merge of rust-lang#70315 - anyska:void-rename, r=Mark-Simulacrum
Rename remaining occurences of Void to Opaque. Two mentions of the type were missed when the type was renamed.
2 parents 589b51f + 403ba61 commit 8d074cd

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed
 

‎src/libcore/fmt/mod.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -282,10 +282,10 @@ impl<'a> ArgumentV1<'a> {
282282
// SAFETY: `mem::transmute(x)` is safe because
283283
// 1. `&'b T` keeps the lifetime it originated with `'b`
284284
// (so as to not have an unbounded lifetime)
285-
// 2. `&'b T` and `&'b Void` have the same memory layout
285+
// 2. `&'b T` and `&'b Opaque` have the same memory layout
286286
// (when `T` is `Sized`, as it is here)
287287
// `mem::transmute(f)` is safe since `fn(&T, &mut Formatter<'_>) -> Result`
288-
// and `fn(&Void, &mut Formatter<'_>) -> Result` have the same ABI
288+
// and `fn(&Opaque, &mut Formatter<'_>) -> Result` have the same ABI
289289
// (as long as `T` is `Sized`)
290290
unsafe { ArgumentV1 { formatter: mem::transmute(f), value: mem::transmute(x) } }
291291
}

0 commit comments

Comments
 (0)
Please sign in to comment.