The E0432 error occurs because the compiler cannot find the module or item you are trying to import, usually due to a missing pub visibility modifier or an incorrect path. Ensure the item you are importing is declared as pub in its source file and that your use statement matches the module hierarchy exactly.
// In the module where the item is defined (e.g., src/lib.rs or a mod file)
pub mod back_of_house {
pub fn fix_incorrect_order() {
// Make sure functions you want to import are public
}
}
// In the file where you want to use it
use crate::back_of_house::fix_incorrect_order;
If the item is in a different crate, ensure it is listed as a dependency in Cargo.toml and imported using the crate name (e.g., use my_crate::item;).