2019-07-27 00:54:25 +03:00
|
|
|
//@ run-pass
|
|
|
|
|
2018-09-14 12:20:28 +02:00
|
|
|
#![allow(dead_code)]
|
2015-03-22 13:13:15 -07:00
|
|
|
|
2019-04-17 19:38:17 -07:00
|
|
|
use std::any::type_name;
|
2013-09-03 18:22:11 -04:00
|
|
|
|
|
|
|
struct Foo<T> {
|
|
|
|
x: T
|
|
|
|
}
|
|
|
|
|
2014-01-03 15:30:54 -08:00
|
|
|
pub fn main() {
|
2019-04-17 19:38:17 -07:00
|
|
|
assert_eq!(type_name::<isize>(), "isize");
|
|
|
|
assert_eq!(type_name::<Foo<usize>>(), "tydesc_name::Foo<usize>");
|
2013-09-03 18:22:11 -04:00
|
|
|
}
|