about summary refs log tree commit diff
path: root/compiler/rustc_errors/src/snippet.rs
diff options
context:
space:
mode:
authorEsteban Küber <esteban@kuber.com.ar>2025-01-31 20:36:44 +0000
committerEsteban Küber <esteban@kuber.com.ar>2025-01-31 20:36:44 +0000
commit8e9422f94e6717721ffbad50862fcef9822c2537 (patch)
treef856d57fb16b2168906deeb0e713798e1f5cd1b8 /compiler/rustc_errors/src/snippet.rs
parent7f36543a48e52912ac6664a70c0a5b9d86509eaf (diff)
downloadrust-8e9422f94e6717721ffbad50862fcef9822c2537.tar.gz
rust-8e9422f94e6717721ffbad50862fcef9822c2537.zip
Make comma separated lists of anything easier to make for errors
Provide a new function `listify`, meant to be used in cases similar to `pluralize!`. When you have a slice of arbitrary elements that need to be presented to the user, `listify` allows you to turn that into a list of comma separated strings.

This reduces a lot of redundant logic that happens often in diagnostics.
Diffstat (limited to 'compiler/rustc_errors/src/snippet.rs')
0 files changed, 0 insertions, 0 deletions