<!-- Thank you for filing a bug report! 🐛 Please provide a short summary of the bug, along with any information you feel relevant to replicating the bug. --> I tried this code: [Repository with the reproduction](https://github.com/Veetaha/path-nested-macro-bug-repro) I expected to see this happen: The code should compile without errors, because this feature was advertised in Rust 1.54 announcement and in https://github.com/rust-lang/rust/pull/83366. Instead, this happened: Compile error `file not found for module generated` was issued More info in README.md of the reproduction repo ### Meta <!-- If you're using the stable version of the compiler, you should also check if the bug also exists in the beta or nightly versions. --> `rustc --version --verbose`: ``` rustc 1.54.0 (a178d0322 2021-07-26) binary: rustc commit-hash: a178d0322ce20e33eac124758e837cbd80a6f633 commit-date: 2021-07-26 host: x86_64-unknown-linux-gnu release: 1.54.0 LLVM version: 12.0.1 ``` cc @jyn514