From: kennytm Date: Sun, 4 Feb 2018 17:27:36 +0000 (+0800) Subject: Rollup merge of #47892 - Badel2:const_type_id_of, r=oli-obk X-Git-Url: https://git.lizzy.rs/?a=commitdiff_plain;h=e17ebdf344401c265ade3b02bb68df0d0485d71a;p=rust.git Rollup merge of #47892 - Badel2:const_type_id_of, r=oli-obk Turn `type_id` into a constant intrinsic https://github.com/rust-lang/rust/issues/27745 The method `get_type_id` in `Any` is intended to support reflection. It's currently unstable in favor of using an associated constant instead. This PR makes the `type_id` intrinsic a constant intrinsic, the same as `size_of` and `align_of`, allowing `TypeId::of` to be a `const fn`, which will allow using an associated constant in `Any`. --- e17ebdf344401c265ade3b02bb68df0d0485d71a