summaryrefslogtreecommitdiffstats
path: root/src/test/ui/issues/issue-23699.rs
blob: 952548837e418238ebfbf3b17b29ad501aad261c (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);
}