Skip to content

Commit 246edb8

Browse files
committed
Make core::fmt::Void a non-empty type.
Because we handle artifically-constructed references to it in live code which is a totally broken thing to do.
1 parent c7ddb89 commit 246edb8

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)