Skip to content

Commit

Permalink
Make core::fmt::Void a non-empty type.
Browse files Browse the repository at this point in the history
Because we handle artifically-constructed references to it in live code which
is a totally broken thing to do.
  • Loading branch information
canndrew committed Nov 28, 2016
1 parent c7ddb89 commit 246edb8
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/libcore/fmt/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,9 @@ pub struct Formatter<'a> {
// NB. Argument is essentially an optimized partially applied formatting function,
// equivalent to `exists T.(&T, fn(&T, &mut Formatter) -> Result`.

enum Void {}
struct Void {
_priv: (),
}

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

0 comments on commit 246edb8

Please sign in to comment.