Checks that a module's items are either imported or qualified with the module's path, but not both.
Mixing the two styles can lead to confusing code.
- No exception is made for for qualifications required for disambiguation.
- Re-exports may not be handled correctly.
use std::env::var;
fn main() {
assert_eq!(var("LD_PRELOAD"), Err(std::env::VarError::NotPresent));
}Instead, either use:
use std::env::{var, VarError};
fn main() {
assert_eq!(var("LD_PRELOAD"), Err(VarError::NotPresent));
}Or use:
fn main() {
assert_eq!(
std::env::var("LD_PRELOAD"),
Err(std::env::VarError::NotPresent)
);
}