Doc-tests shared_memory
WARNING: src/lib.rs - (line 5) Code block is not currently run as a test, but will in future versions of rustdoc. Please ensure this code block is a runnable test, or use the `ignore` directive.
WARNING: src/lib.rs - (line 19) Code block is not currently run as a test, but will in future versions of rustdoc. Please ensure this code block is a runnable test, or use the `ignore` directive.
WARNING: src/locking.rs - locking::SharedMemLockable::rlock (line 56) Code block is not currently run as a test, but will in future versions of rustdoc. Please ensure this code block is a runnable test, or use the `ignore` directive.
WARNING: src/locking.rs - locking::SharedMemLockable::rlock_as_slice (line 69) Code block is not currently run as a test, but will in future versions of rustdoc. Please ensure this code block is a runnable test, or use the `ignore` directive.
WARNING: src/locking.rs - locking::SharedMemLockable::wlock_as_slice (line 94) Code block is not currently run as a test, but will in future versions of rustdoc. Please ensure this code block is a runnable test, or use the `ignore` directive.
WARNING: src/lib.rs - SharedMem<'a>::open (line 138) Code block is not currently run as a test, but will in future versions of rustdoc. Please ensure this code block is a runnable test, or use the `ignore` directive.
WARNING: src/lib.rs - SharedMemCast (line 273) Code block is not currently run as a test, but will in future versions of rustdoc. Please ensure this code block is a runnable test, or use the `ignore` directive.
Doc-tests shared_memory
running 9 tests
test src/lib.rs - (line 19) ... FAILED
test src/lib.rs - (line 5) ... FAILED
test src/lib.rs - SharedMemCast (line 273) ... FAILED
test src/lib.rs - SharedMem<'a>::open (line 138) ... FAILED
test src/locking.rs - locking::SharedMemLockable::wlock_as_slice (line 94) ... FAILED
test src/lib.rs - SharedMem<'a>::create (line 85) ... ok
test src/locking.rs - locking::SharedMemLockable::rlock (line 56) ... ok
test src/locking.rs - locking::SharedMemLockable::rlock_as_slice (line 69) ... ok
test src/locking.rs - locking::SharedMemLockable::wlock (line 81) ... ok
failures:
---- src/lib.rs - (line 19) stdout ----
error: expected one of `.`, `?`, `{`, or an operator, found `;`
--> src/lib.rs:20:95
|
3 | let mut my_shmem: SharedMem = match SharedMem::open(PathBuf::from("shared_mem.link")).unwrap();
| ----- help: try removing this `match` ^ expected one of `.`, `?`, `{`, or an operator here
thread 'rustc' panicked at 'couldn't compile the test', librustdoc/test.rs:306:13
note: Run with `RUST_BACKTRACE=1` for a backtrace.
---- src/lib.rs - (line 5) stdout ----
error: expected one of `,`, `.`, `?`, or an operator, found `LockType`
--> src/lib.rs:7:88
|
4 | let mut my_shmem: SharedMem = match SharedMem::create(PathBuf::from("shared_mem.link") LockType::Mutex, 4096).unwrap();
| ^^^^^^^^ expected one of `,`, `.`, `?`, or an operator here
error: expected one of `.`, `?`, `{`, or an operator, found `;`
--> src/lib.rs:7:119
|
4 | let mut my_shmem: SharedMem = match SharedMem::create(PathBuf::from("shared_mem.link") LockType::Mutex, 4096).unwrap();
| ----- help: try removing this `match` ^ expected one of `.`, `?`, `{`, or an operator here
thread 'rustc' panicked at 'couldn't compile the test', librustdoc/test.rs:306:13
---- src/lib.rs - SharedMemCast (line 273) stdout ----
error: expected type, found `...`
--> src/lib.rs:281:2
|
10 | <...>
| ^^^
error[E0405]: cannot find trait `SharedMemCast` in this scope
--> src/lib.rs:279:13
|
8 | unsafe impl SharedMemCast for SharedState {}
| ^^^^^^^^^^^^^ not found in this scope
thread 'rustc' panicked at 'couldn't compile the test', librustdoc/test.rs:306:13
---- src/lib.rs - SharedMem<'a>::open (line 138) stdout ----
error[E0433]: failed to resolve. Use of undeclared type or module `PathBuf`
--> src/lib.rs:141:53
|
6 | let mut my_shmem: SharedMem = match SharedMem::open(PathBuf::from("shared_mem.link")) {
| ^^^^^^^ Use of undeclared type or module `PathBuf`
thread 'rustc' panicked at 'couldn't compile the test', librustdoc/test.rs:306:13
---- src/locking.rs - locking::SharedMemLockable::wlock_as_slice (line 94) stdout ----
error[E0596]: cannot borrow immutable local variable `write_buf` as mutable
--> src/locking.rs:100:1
|
8 | let write_buf = my_shmem.wlock_as_slice::<u8>().unwrap();
| --------- consider changing this to `mut write_buf`
9 | write_buf[0] = 0x1;
| ^^^^^^^^^ cannot borrow mutably
thread 'rustc' panicked at 'couldn't compile the test', librustdoc/test.rs:306:13
failures:
src/lib.rs - (line 19)
src/lib.rs - (line 5)
src/lib.rs - SharedMem<'a>::open (line 138)
src/lib.rs - SharedMemCast (line 273)
src/locking.rs - locking::SharedMemLockable::wlock_as_slice (line 94)
test result: FAILED. 4 passed; 5 failed; 0 ignored; 0 measured; 0 filtered out