Skip to content

Commit 6d24d57

Browse files
committed
fix doc comment
1 parent 2d4a6f5 commit 6d24d57

File tree

2 files changed

+8
-3
lines changed

2 files changed

+8
-3
lines changed

src/cargo/core/compiler/context/compilation_files.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,12 +25,12 @@ use crate::util::{self, CargoResult};
2525
///
2626
/// This also acts as the main layer of caching provided by Cargo.
2727
/// For example, we want to cache `cargo build` and `cargo doc` separately, so that running one
28-
/// does not invalidate the artifacts for the other. We do this by including `profile` in the hash,
29-
/// thus the artifacts go in different folders and do not override each other.
28+
/// does not invalidate the artifacts for the other. We do this by including `CompileMode` in the
29+
/// hash, thus the artifacts go in different folders and do not override each other.
3030
/// If we don't add something that we should have, for this reason, we get the
3131
/// correct output but rebuild more than is needed.
3232
///
33-
/// Some things that need to be tract to ensure the correct output should definitely *not*
33+
/// Some things that need to be tracked to ensure the correct output should definitely *not*
3434
/// go in the `Metadata`. For example, the modification time of a file, should be tracked to make a
3535
/// rebuild when the file changes. However, it would be wasteful to include in the `Metadata`. The
3636
/// old artifacts are never going to be needed again. We can save space by just overwriting them.

tests/testsuite/freshness.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1160,6 +1160,11 @@ fn changing_rustflags_is_cached() {
11601160
p.cargo("build").run();
11611161
p.cargo("build")
11621162
.env("RUSTFLAGS", "-C target-cpu=native")
1163+
.with_stderr(
1164+
"\
1165+
[COMPILING] foo v0.0.1 ([..])
1166+
[FINISHED] dev [unoptimized + debuginfo] target(s) in [..]",
1167+
)
11631168
.run();
11641169
// This should not recompile!
11651170
p.cargo("build")

0 commit comments

Comments
 (0)