From 8af4713237b34ef9cb580c1a0b27a016949f8c50 Mon Sep 17 00:00:00 2001 From: est31 Date: Sat, 24 Aug 2019 10:06:19 +0200 Subject: [PATCH] Replace type_name intrinsic by stable type_name --- src/lib.rs | 1 - src/object/types.rs | 12 ++++++------ src/parser/deserializer.rs | 4 ++-- 3 files changed, 8 insertions(+), 9 deletions(-) diff --git a/src/lib.rs b/src/lib.rs index 41185bbc5c..a9ef8740f4 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -3,7 +3,6 @@ #![feature(generators)] #![feature(try_trait)] #![feature(bind_by_move_pattern_guards)] -#![feature(core_intrinsics)] #![feature(option_flattening)] #![feature(specialization)] #![feature(proc_macro_hygiene)] diff --git a/src/object/types.rs b/src/object/types.rs index 8177f23ffd..719a990ad0 100644 --- a/src/object/types.rs +++ b/src/object/types.rs @@ -14,7 +14,7 @@ pub trait ExtractType: Sized { impl ExtractType for T { default fn extract(_value: &Tagged) -> Result { - let name = std::intrinsics::type_name::(); + let name = std::any::type_name::(); Err(ShellError::unimplemented(format!( " ExtractType for {}", name @@ -32,7 +32,7 @@ impl ExtractType for T { impl ExtractType for Vec> { fn extract(value: &Tagged) -> Result { - let name = std::intrinsics::type_name::(); + let name = std::any::type_name::(); trace!(" Extracting {:?} for Vec<{}>", value, name); match value.item() { @@ -69,8 +69,8 @@ impl ExtractType for Vec> { impl ExtractType for (T, U) { fn extract(value: &Tagged) -> Result<(T, U), ShellError> { - let t_name = std::intrinsics::type_name::(); - let u_name = std::intrinsics::type_name::(); + let t_name = std::any::type_name::(); + let u_name = std::any::type_name::(); trace!("Extracting {:?} for ({}, {})", value, t_name, u_name); @@ -98,7 +98,7 @@ impl ExtractType for (T, U) { impl ExtractType for Option { fn extract(value: &Tagged) -> Result, ShellError> { - let name = std::intrinsics::type_name::(); + let name = std::any::type_name::(); trace!("