TL;DR: I think this was meant to be removed from lib.rs with this Sep 2024 PR, but was missed?
|
// Temporarily provide some mount functions for use in the fs module for |
|
// backwards compatibility. |
|
#[cfg(linux_kernel)] |
|
#[cfg(all(feature = "fs", not(feature = "mount")))] |
|
pub(crate) mod mount; |
I wanted to try the recently implemented select method, and realized it's not available in a release yet, so I switched to git for rustix:
rustix = { git = "https://github.com/bytecodealliance/rustix.git", features = ["procfs", "event"] }
Compiling fails however due to various errors about the backend lacking the mount module (All errors are from src/mount/ files referring to the backend mount module):
error[E0433]: failed to resolve: could not find `mount` in `backend`
--> /root/.cargo/git/checkouts/rustix-8fafe793515fde97/ec96121/src/mount/fsopen.rs:3:21
|
3 | use crate::backend::mount::types::{
| ^^^^^ could not find `mount` in `backend`
|
note: found an item that was configured out
--> /root/.cargo/git/checkouts/rustix-8fafe793515fde97/ec96121/src/backend/linux_raw/mod.rs:49:16
|
49 | pub(crate) mod mount;
| ^^^^^
note: the item is gated behind the `mount` feature
--> /root/.cargo/git/checkouts/rustix-8fafe793515fde97/ec96121/src/backend/linux_raw/mod.rs:48:7
|
48 | #[cfg(feature = "mount")]
| ^^^^^^^^^^^^^^^^^
The fs feature is implicitly enabled from procfs feature (so lib.rs then enables the mount module):
|
# Enable this to enable `rustix::io::proc_self_*` (on Linux) and `ttyname`. |
|
procfs = ["once_cell", "itoa", "fs"] |
Context
NOTE: This comment line was removed, not sure if that context was intended to be dropped along with the deprecation comment above it.
Config attributes for mod mount:
|
#[cfg(linux_kernel)] |
|
#[cfg(feature = "mount")] |
|
#[cfg_attr(docsrs, doc(cfg(feature = "mount")))] |
|
pub mod mount; |
|
// Temporarily provide some mount functions for use in the fs module for |
|
// backwards compatibility. |
|
#[cfg(linux_kernel)] |
|
#[cfg(all(feature = "fs", not(feature = "mount")))] |
|
pub(crate) mod mount; |
|
// Pick the backend implementation to use. |
|
#[cfg_attr(libc, path = "backend/libc/mod.rs")] |
|
#[cfg_attr(linux_raw, path = "backend/linux_raw/mod.rs")] |
|
#[cfg_attr(wasi, path = "backend/wasi/mod.rs")] |
|
mod backend; |
|
#[cfg(feature = "mount")] |
|
pub(crate) mod mount; |
TL;DR: I think this was meant to be removed from
lib.rswith this Sep 2024 PR, but was missed?rustix/src/lib.rs
Lines 296 to 300 in ec96121
I wanted to try the recently implemented
selectmethod, and realized it's not available in a release yet, so I switched to git forrustix:Compiling fails however due to various errors about the backend lacking the
mountmodule (All errors are fromsrc/mount/files referring to the backend mount module):The
fsfeature is implicitly enabled fromprocfsfeature (solib.rsthen enables themountmodule):rustix/Cargo.toml
Lines 161 to 162 in ec96121
Context
mountmodule. #763lib.rs): Remove deprecated features. #1154NOTE: This comment line was removed, not sure if that context was intended to be dropped along with the deprecation comment above it.
Config attributes for
mod mount:rustix/src/lib.rs
Lines 217 to 220 in ec96121
rustix/src/lib.rs
Lines 296 to 300 in ec96121
rustix/src/lib.rs
Lines 176 to 180 in ec96121
rustix/src/backend/linux_raw/mod.rs
Lines 48 to 49 in ec96121