about summary refs log tree commit diff
path: root/src/test/codegen/src-hash-algorithm
diff options
context:
space:
mode:
authorbors[bot] <26634292+bors[bot]@users.noreply.github.com>2022-02-21 21:57:44 +0000
committerGitHub <noreply@github.com>2022-02-21 21:57:44 +0000
commitc0ee2f23ff70349704dfe8448027a41b7788eb37 (patch)
tree3096c660e3f05f60e659dc83cc40c28f3ade8a9a /src/test/codegen/src-hash-algorithm
parentb663b733d937b5c0a50c9240916d97136613f851 (diff)
parentbf47acf1d3451eb281ea56a6ad8f5e1834ce6a8f (diff)
downloadrust-c0ee2f23ff70349704dfe8448027a41b7788eb37.tar.gz
rust-c0ee2f23ff70349704dfe8448027a41b7788eb37.zip
Merge #11490
11490: Correctly fix formatting doc tests with generics r=Veykril a=KarlWithK

Before the doc_test would be outputted like this:
```zsh
"Foo<T, U>::t"
```
However, this would cause problems with shell redirection. I've changed it
so when generics are involved we simply wrap the expression under quotes as so:
```zsh
"\"Foo<T, U>::t\""
```

Note:
At the cost of adding this, I had to allocate a new string via
`format!{}`. However, I argue this is alright as this for just for
outputting the name of the doc test.

The following tests have been changed:
```
runnables::tests::doc_test_type_params
runnables::tests::test_doc_runnables_impl_mod
runnables::tests::test_runnables_doc_test_in_impl
```

Closes  https://github.com/rust-analyzer/rust-analyzer/issues/11489

Co-authored-by: KarlWithK <jocelinc60@outlook.com>
Co-authored-by: SeniorMars <jocelinc60@outlook.com>
Diffstat (limited to 'src/test/codegen/src-hash-algorithm')
0 files changed, 0 insertions, 0 deletions