document BorrowChecker, make creation unsafe
This commit is contained in:
@@ -83,7 +83,7 @@ impl SumOfPairExercise {
|
||||
pub fn test(&self) {
|
||||
let ctx = WasiCtx::new();
|
||||
let host_memory = HostMemory::new();
|
||||
let bc = BorrowChecker::new();
|
||||
let bc = unsafe { BorrowChecker::new() };
|
||||
|
||||
host_memory
|
||||
.ptr(&bc, self.input_loc.ptr)
|
||||
@@ -173,7 +173,7 @@ impl SumPairPtrsExercise {
|
||||
pub fn test(&self) {
|
||||
let ctx = WasiCtx::new();
|
||||
let host_memory = HostMemory::new();
|
||||
let bc = BorrowChecker::new();
|
||||
let bc = unsafe { BorrowChecker::new() };
|
||||
|
||||
host_memory
|
||||
.ptr(&bc, self.input_first_loc.ptr)
|
||||
@@ -259,7 +259,7 @@ impl SumIntAndPtrExercise {
|
||||
pub fn test(&self) {
|
||||
let ctx = WasiCtx::new();
|
||||
let host_memory = HostMemory::new();
|
||||
let bc = BorrowChecker::new();
|
||||
let bc = unsafe { BorrowChecker::new() };
|
||||
|
||||
host_memory
|
||||
.ptr(&bc, self.input_first_loc.ptr)
|
||||
@@ -318,7 +318,7 @@ impl ReturnPairInts {
|
||||
pub fn test(&self) {
|
||||
let ctx = WasiCtx::new();
|
||||
let host_memory = HostMemory::new();
|
||||
let bc = BorrowChecker::new();
|
||||
let bc = unsafe { BorrowChecker::new() };
|
||||
|
||||
let err = structs::return_pair_ints(&ctx, &host_memory, &bc, self.return_loc.ptr as i32);
|
||||
|
||||
@@ -384,7 +384,7 @@ impl ReturnPairPtrsExercise {
|
||||
pub fn test(&self) {
|
||||
let ctx = WasiCtx::new();
|
||||
let host_memory = HostMemory::new();
|
||||
let bc = BorrowChecker::new();
|
||||
let bc = unsafe { BorrowChecker::new() };
|
||||
|
||||
host_memory
|
||||
.ptr(&bc, self.input_first_loc.ptr)
|
||||
|
||||
Reference in New Issue
Block a user