rust/src/test
bors 954873055a Auto merge of #36823 - durka:discriminant_value, r=nagisa
add wrapper for discriminant_value, take 2

[This is #34785 reopened, since @bors apparently gave up on that thread.]

add wrapper for discriminant_value intrinsic

Implementation of [RFC 1696](https://github.com/rust-lang/rfcs/blob/master/text/1696-discriminant.md).

Wraps the `discriminant_value` intrinsic under the name `std::mem::discriminant`. In order to avoid prematurely leaking information about the implementation of enums, the return value is an opaque type, generic over the enum type, which implements Copy, Clone, PartialEq, Eq, Hash, and Debug (notably not PartialOrd). There is currently no way to get the value out excepting printing the debug representation.

The wrapper is safe and can be stabilized soon as per discussion in #24263.

cc @aturon
r? @nagisa
2016-09-30 07:35:04 -07:00
..
codegen Change the local prefix to _ 2016-09-29 01:11:54 +02:00
codegen-units Fix fallout in tests. 2016-09-27 06:43:51 +00:00
compile-fail Rollup merge of #36757 - KiChjang:E0025-format, r=jonathandturner 2016-09-28 10:33:56 -07:00
compile-fail-fulldeps Rollup merge of #36782 - alexcrichton:rustc-macro-expand-order, r=nrc 2016-09-28 10:33:57 -07:00
debuginfo
incremental Rollup merge of #36460 - mikhail-m1:35123-map3, r=nikomatsakis 2016-09-28 20:21:50 -07:00
mir-opt Remove MIR dump comments from mir-opt tests 2016-09-29 01:22:11 +02:00
parse-fail
pretty
run-fail
run-fail-fulldeps
run-make Rollup merge of #36760 - nrc:input2, r=alexcrichton 2016-09-28 20:21:51 -07:00
run-pass Auto merge of #36823 - durka:discriminant_value, r=nagisa 2016-09-30 07:35:04 -07:00
run-pass-fulldeps Rollup merge of #36760 - nrc:input2, r=alexcrichton 2016-09-28 20:21:51 -07:00
run-pass-valgrind
rustdoc
ui Update E0425, E0446, E0449 2016-09-26 16:05:46 -07:00