diff options
Diffstat (limited to '')
-rw-r--r-- | src/test/ui/issues/issue-23699.rs | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/test/ui/issues/issue-23699.rs b/src/test/ui/issues/issue-23699.rs new file mode 100644 index 000000000..952548837 --- /dev/null +++ b/src/test/ui/issues/issue-23699.rs @@ -0,0 +1,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); +} |