Skip to content

Commit

Permalink
Name bin target differently from lib
Browse files Browse the repository at this point in the history
This avoids file collisions, which lead to spurious rebuilds and errors from
Cargo (recently added by rust-lang/cargo#10172).
  • Loading branch information
Mark-Simulacrum committed Dec 15, 2021
1 parent 9fe2dff commit 26938e1
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
8 changes: 6 additions & 2 deletions collector/benchmarks/token-stream-stress/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,15 @@ edition = "2018"
publish = false

[lib]
# Documenting the library means that we try to rebuild it after src/main.rs
# changes, as of rust-lang/cargo#10172. Since our benchmarks don't actually care
# about it being built, disable that.
doc = false
path = "src/lib.rs"
proc-macro = true

[[bin]]
name = "token-stream-stress"
name = "token-stream-stress-bin"
path = "src/main.rs"

[workspace]
[workspace]
2 changes: 1 addition & 1 deletion collector/benchmarks/token-stream-stress/perf-config.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"cargo_opts": "--bin token-stream-stress",
"cargo_opts": "--bin token-stream-stress-bin",
"touch_file": "src/main.rs"
}

0 comments on commit 26938e1

Please sign in to comment.