diff options
| author | KarlWithK <jocelinc60@outlook.com> | 2022-02-17 20:27:37 -0600 |
|---|---|---|
| committer | KarlWithK <jocelinc60@outlook.com> | 2022-02-17 20:27:37 -0600 |
| commit | 5f3327a6b8925791ecdd9dbecb1bf1537c3ef9fc (patch) | |
| tree | 65433d4b74492fa495c85cf4cfadebd207707b5e /src/test/codegen/src-hash-algorithm | |
| parent | 89faff7477e904f6820990f130a3aed72c1d7e6b (diff) | |
| download | rust-5f3327a6b8925791ecdd9dbecb1bf1537c3ef9fc.tar.gz rust-5f3327a6b8925791ecdd9dbecb1bf1537c3ef9fc.zip | |
Correctly fix formatting doc tests with generics
Before the doc_test would be outputted like this:
"Foo<T, U>::t"
However, this would cause shells with shell redirection. I've changed it
so when generics are involved we simply wrap the expression under escape
chanters as so:
"\"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
Diffstat (limited to 'src/test/codegen/src-hash-algorithm')
0 files changed, 0 insertions, 0 deletions
