stabilize const_type_id feature

This commit is contained in:
Ashley Mannix 2020-05-23 15:17:19 +10:00
parent ac48e62db8
commit cac16c9793
6 changed files with 2 additions and 22 deletions

View file

@ -1,6 +1,5 @@
// run-pass
#![feature(core_intrinsics)]
#![feature(const_type_id)]
use std::any::TypeId;

View file

@ -1,8 +0,0 @@
use std::any::TypeId;
struct A;
fn main() {
const A_ID: TypeId = TypeId::of::<A>();
//~^ ERROR `std::any::TypeId::of` is not yet stable as a const fn
}

View file

@ -1,10 +0,0 @@
error: `std::any::TypeId::of` is not yet stable as a const fn
--> $DIR/const-typeid-of.rs:6:26
|
LL | const A_ID: TypeId = TypeId::of::<A>();
| ^^^^^^^^^^^^^^^^^
|
= help: add `#![feature(const_type_id)]` to the crate attributes to enable
error: aborting due to previous error