darfink / region-rs

A cross-platform virtual memory API written in Rust
https://darfink.github.io/region-rs/
MIT License
119 stars 23 forks source link

`QueryIter` not found in `os` #23

Closed nikkicoon closed 6 months ago

nikkicoon commented 1 year ago

When I compile vendor v3.0.0 as a dependency of another package, using rustc+cargo 1.63.0, I get this (and have to patch it manually). This is on NetBSD if it matters.

   Compiling region v3.0.0
error[E0412]: cannot find type `QueryIter` in module `os`
 --> /usr/work/security/rbw/work/vendor/region-3.0.0/src/query.rs:7:24
  |
7 |   iterator: Option<os::QueryIter>,
  |                        ^^^^^^^^^ not found in `os`
  |
help: consider importing this struct
  |
1 | use crate::QueryIter;
  |
help: if you import `QueryIter`, refer to it directly
  |
7 -   iterator: Option<os::QueryIter>,
7 +   iterator: Option<QueryIter>,
  |

error[E0433]: failed to resolve: could not find `QueryIter` in `os`
  --> /usr/work/security/rbw/work/vendor/region-3.0.0/src/query.rs:15:9
   |
15 |     os::QueryIter::new(origin, size).map(|iterator| Self {
   |         ^^^^^^^^^ not found in `os`
   |
help: consider importing this struct
   |
1  | use crate::QueryIter;
   |
help: if you import `QueryIter`, refer to it directly
   |
15 -     os::QueryIter::new(origin, size).map(|iterator| Self {
15 +     QueryIter::new(origin, size).map(|iterator| Self {
   |

Some errors have detailed explanations: E0412, E0433.
For more information about an error, try `rustc --explain E0412`.
error: could not compile `region` due to 2 previous errors
warning: build failed, waiting for other jobs to finish...
*** Error code 101

Stop.
make[1]: stopped in /usr/pkgsrc/security/rbw
nikkicoon commented 1 year ago

this persists in rustc 1.66

dressupgeekout commented 1 year ago

Probably related to https://github.com/darfink/region-rs/pull/14 not having been merged in yet

darfink commented 6 months ago

Now supported with version 3.0.1.