about summary refs log tree commit diff
path: root/tests/ui/issues/issue-23699.rs
blob: 6dde2dfd93001af76d80c40c0cdfb70d235931dc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
//@ run-pass
#![allow(unused_variables)]
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);
}