about summary refs log tree commit diff
path: root/src/test/codegen/src-hash-algorithm/src-hash-algorithm-sha256.rs
diff options
context:
space:
mode:
authorYacin Tmimi <yacintmimi@gmail.com>2021-12-19 21:27:25 -0500
committerCaleb Cartwright <calebcartwright@users.noreply.github.com>2022-01-01 10:27:49 -0600
commit737e6f704671dbf30e81dababa0133b585c03b48 (patch)
treed623ec894fce91e6c85b8418fee947621cd7e23e /src/test/codegen/src-hash-algorithm/src-hash-algorithm-sha256.rs
parent4a053f206fd6799a25823c307f7d7f9d897be118 (diff)
downloadrust-737e6f704671dbf30e81dababa0133b585c03b48.tar.gz
rust-737e6f704671dbf30e81dababa0133b585c03b48.zip
Improve out of line module resolution
Fixes 5119

When the directory structure was laid out as follows:

```
dir
 |---mod_a
 |    |---sub_mod_1.rs
 |    |---sub_mod_2.rs
 |---mod_a.rs
```

And ``mod_a.rs`` contains the following content:

```rust
mod mod_a {
    mod sub_mod_1;
    mod sub_mod_2;
}
```

rustfmt previously tried to find ``sub_mod_1.rs`` and ``sub_mod_2.rs``
in ``./mod_a/mod_a/``. This directory does not exist and this caused
rustfmt to fail with the error message:

    Error writing files: failed to resolve mod

Now, both ``sub_mod_1.rs`` and ``sub_mod_2.rs`` are resolved correctly
and found at ``mod_a/sub_mod_1.rs`` and ``mod_a/sub_mod_2.rs``.
Diffstat (limited to 'src/test/codegen/src-hash-algorithm/src-hash-algorithm-sha256.rs')
0 files changed, 0 insertions, 0 deletions