about summary refs log tree commit diff
path: root/tests/codegen/src-hash-algorithm/src-hash-algorithm-sha1.rs
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2023-09-06 19:51:07 +0000
committerbors <bors@rust-lang.org>2023-09-06 19:51:07 +0000
commita843e4699e8cb327e03eb2048b640f54220fc95d (patch)
tree0d60238b7d71d06bc7547572dd03524cd3adb8f6 /tests/codegen/src-hash-algorithm/src-hash-algorithm-sha1.rs
parentf29867bd26ec0ed34a8c26cd39fc02df657a13f8 (diff)
parent42f77f89ff39546cc8cf0f3a8d2513424d479a58 (diff)
downloadrust-a843e4699e8cb327e03eb2048b640f54220fc95d.tar.gz
rust-a843e4699e8cb327e03eb2048b640f54220fc95d.zip
Auto merge of #15564 - davidbarsky:davidbarsky/use-current-subcrates-rustfmt-toml-with-custom-command, r=Veykril
internal: use current folder's `rustfmt.toml` with all rustfmt configurations

## Introduction

Resolves https://github.com/rust-lang/rust-analyzer/issues/15540. I moved the `chdir` functionality outside of the `match` to ensure that this functionality wouldn’t fall through again. As part of this PR, I also changed `from_proto::file_range` to accept a `TextDocumentIdentifier` by reference instead of by value, but I can undo this change if desired.

## Testing

I added a `rustfmt.toml` will the contents below at `crates/rust-analyzer/rustfmt.toml`:


```toml
reorder_modules = false
use_small_heuristics = "Max"
# this is the only difference from the `rustfmt.toml` at the root of the repo
tab_spaces = 8
```

In addition, I've also added `"rust-analyzer.rustfmt.overrideCommand": ["rustfmt"]` to my VS Code configuration.

With the above changes, saving `crates/rust-analyzer/src/handlers/request.rs` results in 8-space indentation. Meanwhile, saving `crates/toolchain/src/lib.rs` _does not_ result in any formatting changes.
Diffstat (limited to 'tests/codegen/src-hash-algorithm/src-hash-algorithm-sha1.rs')
0 files changed, 0 insertions, 0 deletions