]> git.lizzy.rs Git - rust.git/blob - tests/ui/issues/issue-23699.rs
Rollup merge of #105796 - notriddle:notriddle/rustdoc-search-stop-doing-demerits...
[rust.git] / tests / ui / issues / issue-23699.rs
1 // run-pass
2 #![allow(unused_variables)]
3 fn gimme_a_raw_pointer<T>(_: *const T) { }
4
5 fn test<T>(t: T) { }
6
7 fn main() {
8     // Clearly `pointer` must be of type `*const ()`.
9     let pointer = &() as *const _;
10     gimme_a_raw_pointer(pointer);
11
12     let t = test as fn (i32);
13     t(0i32);
14 }