0
0
Fork 0
mirror of https://github.com/denoland/rusty_v8.git synced 2024-12-27 01:29:19 -05:00
denoland-rusty-v8/tests/compile_fail/try_catch_lifetimes.rs

22 lines
592 B
Rust
Raw Normal View History

// Copyright 2019-2020 the Deno authors. All rights reserved. MIT license.
use rusty_v8 as v8;
pub fn main() {
let mut scope: v8::Scope<v8::HandleScope, v8::Locker> = mock();
let scope = scope.enter();
let context: v8::Local<v8::Context> = mock();
let _leaked = {
let mut try_catch = v8::TryCatch::new(scope);
let tc = try_catch.enter();
let exception = tc.exception().unwrap();
let stack_trace = tc.stack_trace(scope, context).unwrap();
let message = tc.message().unwrap();
(exception, stack_trace, message)
};
}
fn mock<T>() -> T {
unimplemented!()
}