libproc-rs icon indicating copy to clipboard operation
libproc-rs copied to clipboard

build error in aosp rust

Open idersan opened this issue 10 months ago • 1 comments

error 1:

error[E0425]: cannot find function `listpids` in this scope
  --> external/rust/crates/libproc-rs/src/processes.rs:68:5
   |
68 |     listpids(filter)
   |     ^^^^^^^^ not found in this scope
   |
help: consider importing this function
   |
1  + use crate::libproc::proc_pid::listpids;
   |

error: aborting due to previous error

error 2:

error[E0308]: mismatched types
   --> external/rust/crates/libproc-rs/src/processes.rs:69:14
    |
69  |     listpids(filter)
    |     -------- ^^^^^^ expected `ProcType`, found `ProcFilter`
    |     |
    |     arguments to this function are incorrect
    |
note: function defined here
   --> external/rust/crates/libproc-rs/src/libproc/proc_pid.rs:185:8
    |
185 | pub fn listpids(proc_types: ProcType) -> Result<Vec<u32>, String> {
    |        ^^^^^^^^ --------------------

error[E0308]: mismatched types
  --> external/rust/crates/libproc-rs/src/processes.rs:69:5
   |
68 | pub fn pids_by_type(filter: ProcFilter) -> io::Result<Vec<u32>> {
   |                                            -------------------- expected `Result<Vec<u32>, std::io::Error>` because of return type
69 |     listpids(filter)
   |     ^^^^^^^^^^^^^^^^ expected `Result<Vec<u32>, Error>`, found `Result<Vec<u32>, String>`
   |
   = note: expected enum `Result<_, std::io::Error>`
              found enum `Result<_, String>`

error: aborting due to 2 previous errors

For more information about this error, try `rustc --explain E0308`.
18:21:05 ninja failed with: exit status 1

#### failed to build some targets (4 seconds) ####

idersan avatar Sep 02 '23 10:09 idersan