From 5b785bc3426accdbec863454ca218e29617e9839 Mon Sep 17 00:00:00 2001 From: Alex Burka Date: Thu, 15 Sep 2016 23:05:47 -0400 Subject: [PATCH] fix typo in RFC 1696 During discussion we decided to remove the Reflect bound, and I removed it from one part of the text but not another. Further discussion ensued, but we never decided to put Reflect back in. --- text/1696-discriminant.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/text/1696-discriminant.md b/text/1696-discriminant.md index 437f1d1c72b..e0d888fc73b 100644 --- a/text/1696-discriminant.md +++ b/text/1696-discriminant.md @@ -20,7 +20,7 @@ The motivation for this is mostly identical to [RFC 639](https://github.com/rust The proposed design has been implemented at [#34785](https://github.com/rust-lang/rust/pull/34785) (after some back-and-forth). That implementation is copied at the end of this section for reference. -A struct `Discriminant` and a free function `fn discriminant(v: &T) -> Discriminant` are added to `std::mem` (for lack of a better home, and noting that `std::mem` already contains similar parametricity escape hatches such as `size_of`). For now, the `Discriminant` struct is simply a newtype over `u64`, because that's what the `discriminant_value` intrinsic returns, and a `PhantomData` to allow it to be generic over `T`. +A struct `Discriminant` and a free function `fn discriminant(v: &T) -> Discriminant` are added to `std::mem` (for lack of a better home, and noting that `std::mem` already contains similar parametricity escape hatches such as `size_of`). For now, the `Discriminant` struct is simply a newtype over `u64`, because that's what the `discriminant_value` intrinsic returns, and a `PhantomData` to allow it to be generic over `T`. Making `Discriminant` generic provides several benefits: