mirror of
https://github.com/denoland/rusty_v8.git
synced 2025-01-11 16:42:32 -05:00
rust 1.79.0 (#1527)
This commit is contained in:
parent
8cdd3de9f4
commit
7107d4869e
5 changed files with 22 additions and 18 deletions
2
.gitignore
vendored
2
.gitignore
vendored
|
@ -1,6 +1,8 @@
|
|||
**/*.rs.bk
|
||||
**/*.orig
|
||||
|
||||
.envrc
|
||||
|
||||
/.vscode/
|
||||
/.idea/
|
||||
/target/
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
[toolchain]
|
||||
channel = "1.77.2"
|
||||
channel = "1.79.0"
|
||||
components = ["rustfmt", "clippy"]
|
||||
targets = [
|
||||
"x86_64-apple-darwin",
|
||||
|
|
|
@ -710,8 +710,9 @@ impl Object {
|
|||
wrapper: Local<Object>,
|
||||
value: &impl GetRustObj<T>,
|
||||
) {
|
||||
// TODO: use a const assert once const expressions are stable
|
||||
assert!(TAG < LAST_TAG);
|
||||
const {
|
||||
assert!(TAG < LAST_TAG);
|
||||
}
|
||||
let ptr = value.get_rust_obj();
|
||||
unsafe { v8__Object__Wrap(isolate as *mut _, &*wrapper, ptr, TAG) }
|
||||
}
|
||||
|
@ -727,8 +728,9 @@ impl Object {
|
|||
isolate: &mut Isolate,
|
||||
wrapper: Local<Object>,
|
||||
) -> Option<Ptr<T>> {
|
||||
// TODO: use a const assert once const expressions are stable
|
||||
assert!(TAG < LAST_TAG);
|
||||
const {
|
||||
assert!(TAG < LAST_TAG);
|
||||
}
|
||||
let ptr = unsafe { v8__Object__Unwrap(isolate as *mut _, &*wrapper, TAG) };
|
||||
Ptr::new(&ptr)
|
||||
}
|
||||
|
|
|
@ -7,13 +7,13 @@ error[E0277]: the trait bound `OwnedIsolate: v8::scope::param::NewEscapableHandl
|
|||
| required by a bound introduced by this call
|
||||
|
|
||||
= help: the following other types implement trait `v8::scope::param::NewEscapableHandleScope<'s, 'e>`:
|
||||
<ContextScope<'p, P> as v8::scope::param::NewEscapableHandleScope<'s, 'e>>
|
||||
<HandleScope<'p, C> as v8::scope::param::NewEscapableHandleScope<'s, 'p>>
|
||||
<EscapableHandleScope<'p, 'e, C> as v8::scope::param::NewEscapableHandleScope<'s, 'p>>
|
||||
<TryCatch<'p, P> as v8::scope::param::NewEscapableHandleScope<'s, 'e>>
|
||||
<CallbackScope<'p, C> as v8::scope::param::NewEscapableHandleScope<'s, 'p>>
|
||||
<DisallowJavascriptExecutionScope<'p, P> as v8::scope::param::NewEscapableHandleScope<'s, 'e>>
|
||||
<AllowJavascriptExecutionScope<'p, P> as v8::scope::param::NewEscapableHandleScope<'s, 'e>>
|
||||
<CallbackScope<'p, C> as v8::scope::param::NewEscapableHandleScope<'s, 'p>>
|
||||
<ContextScope<'p, P> as v8::scope::param::NewEscapableHandleScope<'s, 'e>>
|
||||
<DisallowJavascriptExecutionScope<'p, P> as v8::scope::param::NewEscapableHandleScope<'s, 'e>>
|
||||
<EscapableHandleScope<'p, 'e, C> as v8::scope::param::NewEscapableHandleScope<'s, 'p>>
|
||||
<HandleScope<'p, C> as v8::scope::param::NewEscapableHandleScope<'s, 'p>>
|
||||
<TryCatch<'p, P> as v8::scope::param::NewEscapableHandleScope<'s, 'e>>
|
||||
note: required by a bound in `EscapableHandleScope::<'s, 'e>::new`
|
||||
--> src/scope.rs
|
||||
|
|
||||
|
@ -27,10 +27,10 @@ error[E0277]: the trait bound `OwnedIsolate: v8::scope::param::NewEscapableHandl
|
|||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `v8::scope::param::NewEscapableHandleScope<'_, '_>` is not implemented for `OwnedIsolate`
|
||||
|
|
||||
= help: the following other types implement trait `v8::scope::param::NewEscapableHandleScope<'s, 'e>`:
|
||||
<ContextScope<'p, P> as v8::scope::param::NewEscapableHandleScope<'s, 'e>>
|
||||
<HandleScope<'p, C> as v8::scope::param::NewEscapableHandleScope<'s, 'p>>
|
||||
<EscapableHandleScope<'p, 'e, C> as v8::scope::param::NewEscapableHandleScope<'s, 'p>>
|
||||
<TryCatch<'p, P> as v8::scope::param::NewEscapableHandleScope<'s, 'e>>
|
||||
<CallbackScope<'p, C> as v8::scope::param::NewEscapableHandleScope<'s, 'p>>
|
||||
<DisallowJavascriptExecutionScope<'p, P> as v8::scope::param::NewEscapableHandleScope<'s, 'e>>
|
||||
<AllowJavascriptExecutionScope<'p, P> as v8::scope::param::NewEscapableHandleScope<'s, 'e>>
|
||||
<CallbackScope<'p, C> as v8::scope::param::NewEscapableHandleScope<'s, 'p>>
|
||||
<ContextScope<'p, P> as v8::scope::param::NewEscapableHandleScope<'s, 'e>>
|
||||
<DisallowJavascriptExecutionScope<'p, P> as v8::scope::param::NewEscapableHandleScope<'s, 'e>>
|
||||
<EscapableHandleScope<'p, 'e, C> as v8::scope::param::NewEscapableHandleScope<'s, 'p>>
|
||||
<HandleScope<'p, C> as v8::scope::param::NewEscapableHandleScope<'s, 'p>>
|
||||
<TryCatch<'p, P> as v8::scope::param::NewEscapableHandleScope<'s, 'e>>
|
||||
|
|
|
@ -251,7 +251,7 @@ fn test_string() {
|
|||
assert_eq!(2, local.utf8_length(scope));
|
||||
// Should round-trip to UTF-8
|
||||
assert_eq!(2, local.to_rust_string_lossy(scope).len());
|
||||
let mut buf = [MaybeUninit::uninit(); 0];
|
||||
let mut buf: [MaybeUninit<u8>; 0] = [];
|
||||
assert_eq!(2, local.to_rust_cow_lossy(scope, &mut buf).len());
|
||||
let mut buf = [MaybeUninit::uninit(); 10];
|
||||
assert_eq!(2, local.to_rust_cow_lossy(scope, &mut buf).len());
|
||||
|
|
Loading…
Reference in a new issue