about summary refs log tree commit diff
path: root/src/libcore
diff options
context:
space:
mode:
authorAndrew Cann <shum@canndrew.org>2016-11-28 21:22:41 +0800
committerAndrew Cann <shum@canndrew.org>2016-11-28 21:22:41 +0800
commit246edb8628cb4df26e37ef42a50ee076b9e21ff4 (patch)
tree9b6d2a53e5d373e0dadff7f7d0a1f66aef0399b9 /src/libcore
parentc7ddb8946bf041d89ba109ec8dd754492de78606 (diff)
downloadrust-246edb8628cb4df26e37ef42a50ee076b9e21ff4.tar.gz
rust-246edb8628cb4df26e37ef42a50ee076b9e21ff4.zip
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.
Diffstat (limited to 'src/libcore')
-rw-r--r--src/libcore/fmt/mod.rs4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/libcore/fmt/mod.rs b/src/libcore/fmt/mod.rs
index 2d75a8ec420..9167264ba9d 100644
--- a/src/libcore/fmt/mod.rs
+++ b/src/libcore/fmt/mod.rs
@@ -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