2018-08-30 07:18:55 -05:00
|
|
|
// run-pass
|
2018-09-25 16:51:35 -05:00
|
|
|
#![allow(unused_variables)]
|
2016-11-21 15:02:03 -06:00
|
|
|
fn gimme_a_raw_pointer<T>(_: *const T) { }
|
|
|
|
|
|
|
|
fn test<T>(t: T) { }
|
|
|
|
|
|
|
|
fn main() {
|
|
|
|
// Clearly `pointer` must be of type `*const ()`.
|
|
|
|
let pointer = &() as *const _;
|
|
|
|
gimme_a_raw_pointer(pointer);
|
|
|
|
|
|
|
|
let t = test as fn (i32);
|
|
|
|
t(0i32);
|
|
|
|
}
|