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 2f9f182 commit 6ae6dd5Copy full SHA for 6ae6dd5
1 file changed
tests/ui/intrinsics/reify-intrinsic.rs
@@ -26,6 +26,12 @@ fn c() -> [fn(bool) -> bool; 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
let [likely_ptr, unlikely_ptr] = c();
42
assert!(likely_ptr(true));
43
assert!(unlikely_ptr(true));
44
45
+ call_by_ptr();
38
46
0 commit comments