Skip to content

Commit 5ea71fc

Browse files
committed
Mark proc-macro crates
1 parent 47ac484 commit 5ea71fc

File tree

1 file changed

+12
-1
lines changed
  • src/cargo/ops/tree/format

1 file changed

+12
-1
lines changed

src/cargo/ops/tree/format/mod.rs

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,18 @@ impl<'a> fmt::Display for Display<'a> {
6666
match chunk {
6767
Chunk::Raw(s) => fmt.write_str(s)?,
6868
Chunk::Package => {
69-
write!(fmt, "{} v{}", package.name(), package.version())?;
69+
let proc_macro_suffix = if package.proc_macro() {
70+
" (proc-macro)"
71+
} else {
72+
""
73+
};
74+
write!(
75+
fmt,
76+
"{} v{}{}",
77+
package.name(),
78+
package.version(),
79+
proc_macro_suffix
80+
)?;
7081

7182
let source_id = package.package_id().source_id();
7283
if !source_id.is_default_registry() {

0 commit comments

Comments
 (0)