summaryrefslogtreecommitdiff
path: root/ops/tests/compile_fail
diff options
context:
space:
mode:
Diffstat (limited to 'ops/tests/compile_fail')
-rw-r--r--ops/tests/compile_fail/unsupported.rs7
-rw-r--r--ops/tests/compile_fail/unsupported.stderr20
2 files changed, 25 insertions, 2 deletions
diff --git a/ops/tests/compile_fail/unsupported.rs b/ops/tests/compile_fail/unsupported.rs
index 1c4d6407a..52d55de5b 100644
--- a/ops/tests/compile_fail/unsupported.rs
+++ b/ops/tests/compile_fail/unsupported.rs
@@ -17,6 +17,13 @@ fn op_u16_arg(a: u16, b: u16) {
//
}
+use deno_core::v8::fast_api::FastApiCallbackOptions;
+
+#[op(fast)]
+fn op_callback_options(options: &mut FastApiCallbackOptions) {
+ // fast callback options must be an Option.
+}
+
#[op(fast)]
async fn op_async_fn(a: i32, b: i32) -> i32 {
a + b
diff --git a/ops/tests/compile_fail/unsupported.stderr b/ops/tests/compile_fail/unsupported.stderr
index 68c9f7f16..88d1c1fe4 100644
--- a/ops/tests/compile_fail/unsupported.stderr
+++ b/ops/tests/compile_fail/unsupported.stderr
@@ -23,9 +23,25 @@ error: custom attribute panicked
= help: message: op cannot be a fast api. enforced by #[op(fast)]
error: custom attribute panicked
- --> tests/compile_fail/unsupported.rs:20:1
+ --> tests/compile_fail/unsupported.rs:22:1
|
-20 | #[op(fast)]
+22 | #[op(fast)]
+ | ^^^^^^^^^^^
+ |
+ = help: message: op cannot be a fast api. enforced by #[op(fast)]
+
+error: custom attribute panicked
+ --> tests/compile_fail/unsupported.rs:27:1
+ |
+27 | #[op(fast)]
| ^^^^^^^^^^^
|
= help: message: async op cannot be a fast api. enforced by #[op(fast)]
+
+warning: unused import: `deno_core::v8::fast_api::FastApiCallbackOptions`
+ --> tests/compile_fail/unsupported.rs:20:5
+ |
+20 | use deno_core::v8::fast_api::FastApiCallbackOptions;
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+ |
+ = note: `#[warn(unused_imports)]` on by default