Skip to content

Commit dc81742

Browse files
committed
Auto merge of #38047 - canndrew:fmt-void-non-empty, r=bluss
Make core::fmt::Void a non-empty type. Adding back this change that was removed from PR #36449 because it's a fix and because I immediately hit a problem with it again when I started implementing my fix for #12609.
2 parents ecff71a + 246edb8 commit dc81742

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

Diff for: src/libcore/fmt/mod.rs

+3-1
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,9 @@ pub struct Formatter<'a> {
166166
// NB. Argument is essentially an optimized partially applied formatting function,
167167
// equivalent to `exists T.(&T, fn(&T, &mut Formatter) -> Result`.
168168

169-
enum Void {}
169+
struct Void {
170+
_priv: (),
171+
}
170172

171173
/// This struct represents the generic "argument" which is taken by the Xprintf
172174
/// family of functions. It contains a function to format the given value. At

0 commit comments

Comments
 (0)