We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1aed382 commit e8ef4efCopy full SHA for e8ef4ef
1 file changed
tests/ui/intrinsics/reify-intrinsic.rs
@@ -26,6 +26,12 @@ fn c() -> [unsafe fn(f32) -> f32; 2] {
26
fs
27
}
28
29
+fn call_by_ptr() {
30
+ let ptr: fn(u8, u8) -> u8 = std::intrinsics::wrapping_add::<u8>;
31
+ let res = ptr(u8::MAX, 1);
32
+ assert_eq!(res, 0);
33
+}
34
+
35
fn main() {
36
unsafe {
37
assert_eq!(a()(-1), !0);
@@ -35,4 +41,6 @@ fn main() {
41
assert_eq!(floorf32_ptr(1.5), 1.0);
42
assert_eq!(log2f32_ptr(2.0), 1.0);
43
44
45
+ call_by_ptr();
38
46
0 commit comments