2019-07-27 00:54:25 +03:00
|
|
|
//@ run-pass
|
|
|
|
|
2019-06-20 17:48:02 +03:00
|
|
|
#![feature(core_intrinsics)]
|
|
|
|
|
2019-04-17 19:38:17 -07:00
|
|
|
use std::any::type_name;
|
2019-06-20 17:48:02 +03:00
|
|
|
|
2023-12-27 17:11:58 -05:00
|
|
|
struct Bar<M>(#[allow(dead_code)] M);
|
2019-06-20 17:48:02 +03:00
|
|
|
|
|
|
|
impl<M> Bar<M> {
|
|
|
|
fn foo(&self) -> &'static str {
|
|
|
|
fn f() {}
|
|
|
|
fn type_name_of<T>(_: T) -> &'static str {
|
2019-04-17 19:38:17 -07:00
|
|
|
type_name::<T>()
|
2019-06-20 17:48:02 +03:00
|
|
|
}
|
|
|
|
type_name_of(f)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
fn main() {
|
|
|
|
assert_eq!(Bar(()).foo(), "issue_61894::Bar<_>::foo::f");
|
|
|
|
}
|