-
Couldn't load subscription status.
- Fork 961
Closed
Labels
C-bugCategory: this is a bug; use also I-* labels for specific bug kinds, e.g. I-non-idempotency or I-ICECategory: this is a bug; use also I-* labels for specific bug kinds, e.g. I-non-idempotency or I-ICEP-highHigh priorityHigh priority
Description
I originally reported this in #2407, but on further reflection I think it deserves its own issue. rustfmt fails for Rust 2018 submodules that don't use mod.rs (because of path clarity). Example:
$ mkdir foo
$ touch foo/bar.rs
$ echo 'mod bar;' > foo.rs
$ rustfmt --edition 2018 foo.rs
error[E0583]: file not found for module `bar`
--> /private/tmp/demo/foo.rs:1:5
|
1 | mod bar;
| ^^^
|
= help: name the file either bar.rs or bar/mod.rs inside the directory "/private/tmp/demo"
For clarity, the file structure is:
$ tree
.
├── foo
│ └── bar.rs
└── foo.rs
Here, foo.rs is the Rust 2018 equivalent of Rust 2015's foo/mod.rs.
mkovaxx
Metadata
Metadata
Assignees
Labels
C-bugCategory: this is a bug; use also I-* labels for specific bug kinds, e.g. I-non-idempotency or I-ICECategory: this is a bug; use also I-* labels for specific bug kinds, e.g. I-non-idempotency or I-ICEP-highHigh priorityHigh priority