pu369com

2021年8月19日

如何在Rust中打印变量的类型及类型转换实践

摘要: #![feature(core_intrinsics)] fn print_type_of<T>(_: T) { println!("{}", std::intrinsics::type_name::<T>() ); } fn main() { print_type_of(3); // prints 阅读全文

posted @ 2021-08-19 18:57 pu369com 阅读(804) 评论(0) 推荐(0) 编辑

rust遇到了error[E0554]: `#![feature]` may not be used on the stable release channel(切换nightly版本)

摘要: 参考:https://blog.51cto.com/u_14256460/2627326 从错误信息`#![feature]` may not be used on the stable release channel可以看出当前编译使用的channel还没有包含#![feature]功能,那咋办呢 阅读全文

posted @ 2021-08-19 12:48 pu369com 阅读(4238) 评论(0) 推荐(1) 编辑

导航