Skip to content

Same name files was overwrite #3421

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
hemaolong opened this issue Feb 27, 2019 · 6 comments
Closed

Same name files was overwrite #3421

hemaolong opened this issue Feb 27, 2019 · 6 comments
Labels
bug Panic, non-idempotency, invalid code, etc. p-high

Comments

@hemaolong
Copy link

hemaolong commented Feb 27, 2019

The files with same name in different path may be overwrite .

This is the mini project to reproduce the bug.
In thiscase, src/system/pay.rs will be messed.
/////////////// main.rs
// Be careful the sequence of mod definition in the main.rs
mod system {
pub mod pay;
}
mod hf;

pub fn main() {}
//////////////end if main.rs

//////////////////// project layout
E:.
│ hf.rs
│ main.rs

├───hf
│ └───system
│ pay.rs

└───system
pay.rs

@hemaolong
Copy link
Author

btw, rustfmt version: rustfmt 1.0.3-nightly (d6829d6 2019-02-14)

@topecongiro
Copy link
Contributor

@hemaolong Thanks you for reporting this issue. Unfortunately I could not reproduce this locally with the following layout. I think that the actual content of the files could matter. Is it possible for you to publish the exact minimal project so that I could investigate this issue further?

.
├── hf
│   └── system.rs
├── hf.rs
├── main.rs
├── pay.rs
└── system
    └── pay.rs

@hemaolong
Copy link
Author

@topecongiro
fmt_bug.zip
My mistake, the first pay.rs should be under /src/hf/system/pay.rs.

Sorry to response too late.
I attached the minimal project but it seems has no effect.
I do it again after update my Chrome ^-^

@topecongiro topecongiro added the bug Panic, non-idempotency, invalid code, etc. label Mar 3, 2019
@topecongiro
Copy link
Contributor

@hemaolong Thanks! I could reproduce it with your example.

cc #3427.

@rchaser53
Copy link
Contributor

This issue is resolved by #3448

@topecongiro
Copy link
Contributor

@rchaser53 Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Panic, non-idempotency, invalid code, etc. p-high
Projects
None yet
Development

No branches or pull requests

3 participants