2019-07-26 16:54:25 -05:00
|
|
|
// run-pass
|
|
|
|
|
2019-06-20 09:48:02 -05:00
|
|
|
#![feature(core_intrinsics)]
|
|
|
|
|
2019-04-17 21:38:17 -05:00
|
|
|
use std::any::type_name;
|
2019-06-20 09:48:02 -05:00
|
|
|
|
2022-07-25 15:36:03 -05:00
|
|
|
struct Bar<M>(#[allow(unused_tuple_struct_fields)] M);
|
2019-06-20 09:48:02 -05:00
|
|
|
|
|
|
|
impl<M> Bar<M> {
|
|
|
|
fn foo(&self) -> &'static str {
|
|
|
|
fn f() {}
|
|
|
|
fn type_name_of<T>(_: T) -> &'static str {
|
2019-04-17 21:38:17 -05:00
|
|
|
type_name::<T>()
|
2019-06-20 09:48:02 -05:00
|
|
|
}
|
|
|
|
type_name_of(f)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
fn main() {
|
|
|
|
assert_eq!(Bar(()).foo(), "issue_61894::Bar<_>::foo::f");
|
|
|
|
}
|