stabilize const_type_id feature
This commit is contained in:
parent
ac48e62db8
commit
cac16c9793
6 changed files with 2 additions and 22 deletions
|
|
@ -1,6 +1,5 @@
|
|||
// run-pass
|
||||
#![feature(core_intrinsics)]
|
||||
#![feature(const_type_id)]
|
||||
|
||||
use std::any::TypeId;
|
||||
|
||||
|
|
|
|||
|
|
@ -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
|
||||
}
|
||||
|
|
@ -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
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue