If someone develops on unixy computers, they could accidentally use one of the restricted Windows device filenames, making their project hard to compile/contribute to on Windows.
While this will become readily apparent as soon as, for example, the project adds CI to test on Windows, we could catch it early and less obscurely with a lightweight warn-by-default lint that recommends not using aux.rs
, con.rs
, or other such filenames in source.
This is related to but different from this earlier clippy lint for a warning with file paths such as File::open("aux")
.
This lint would not restrict mod names, only source filenames. For example, this would be lint-free:
mod aux {
pub type Example = bool;
}
#[path="auxiliary.rs"]
mod aux;
but this would warn:
mod aux;