about summary refs log tree commit diff
path: root/tests/codegen-llvm/src-hash-algorithm/src-hash-algorithm-md5.rs
diff options
context:
space:
mode:
authorNicholas Nethercote <n.nethercote@gmail.com>2025-05-27 15:51:47 +1000
committerNicholas Nethercote <n.nethercote@gmail.com>2025-07-17 08:37:19 +1000
commitb7caf7593eb77cf8a967fdd40c441b9275bbe7ee (patch)
tree161614956736bf13403921a7c98b95c02354a0a4 /tests/codegen-llvm/src-hash-algorithm/src-hash-algorithm-md5.rs
parentf4b827abeba9f10e6a6f0aaf8c29c7389fe1836a (diff)
downloadrust-b7caf7593eb77cf8a967fdd40c441b9275bbe7ee.tar.gz
rust-b7caf7593eb77cf8a967fdd40c441b9275bbe7ee.zip
Improve path segment joining.
There are many places that join path segments with `::` to produce a
string. A lot of these use `join("::")`. Many in rustdoc use
`join_with_double_colon`, and a few use `.joined("..")`. One in Clippy
uses `itertools::join`. A couple of them look for `kw::PathRoot` in the
first segment, which can be important.

This commit introduces `rustc_ast::join_path_{syms,ident}` to do the
joining for everyone. `rustc_ast` is as good a location for these as
any, being the earliest-running of the several crates with a `Path`
type. Two functions are needed because `Ident` printing is more complex
than simple `Symbol` printing.

The commit also removes `join_with_double_colon`, and
`estimate_item_path_byte_length` with it.

There are still a handful of places that join strings with "::" that are
unchanged. They are not that important: some of them are in tests, and
some of them first split a path around "::" and then rejoin with "::".

This fixes one test case where `{{root}}` shows up in an error message.
Diffstat (limited to 'tests/codegen-llvm/src-hash-algorithm/src-hash-algorithm-md5.rs')
0 files changed, 0 insertions, 0 deletions