Skip to content

Commit

Permalink
Rollup merge of rust-lang#70315 - anyska:void-rename, r=Mark-Simulacrum
Browse files Browse the repository at this point in the history
Rename remaining occurences of Void to Opaque.

Two mentions of the type were missed when the type was renamed.
  • Loading branch information
Centril authored Mar 23, 2020
2 parents 589b51f + 403ba61 commit 8d074cd
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/libcore/fmt/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -282,10 +282,10 @@ impl<'a> ArgumentV1<'a> {
// SAFETY: `mem::transmute(x)` is safe because
// 1. `&'b T` keeps the lifetime it originated with `'b`
// (so as to not have an unbounded lifetime)
// 2. `&'b T` and `&'b Void` have the same memory layout
// 2. `&'b T` and `&'b Opaque` have the same memory layout
// (when `T` is `Sized`, as it is here)
// `mem::transmute(f)` is safe since `fn(&T, &mut Formatter<'_>) -> Result`
// and `fn(&Void, &mut Formatter<'_>) -> Result` have the same ABI
// and `fn(&Opaque, &mut Formatter<'_>) -> Result` have the same ABI
// (as long as `T` is `Sized`)
unsafe { ArgumentV1 { formatter: mem::transmute(f), value: mem::transmute(x) } }
}
Expand Down

0 comments on commit 8d074cd

Please sign in to comment.