Open
Description
I tried this code:
https://github.com/jj-vcs/jj (no MRE yet, if I can figure something out, I will)
I expected to see this happen: the code to compile successfully
Instead, this happened: the code failed to compile, citing that some function calls/types are incorrect:
error[E0061]: this function takes 2 arguments but 3 arguments were supplied
--> cli/src/commands/duplicate.rs:206:9
|
206 | duplicate_commits_onto_parents(tx.repo_mut(), &to_duplicate, &new_descs)?
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ---------- unexpected argument #3 of type `&std::collections::HashMap<jj_lib::backend::CommitId, std::string::String>`
|
note: function defined here
--> /Users/winter/src/jj/lib/src/rewrite.rs:905:8
help: remove the extra argument
|
206 - duplicate_commits_onto_parents(tx.repo_mut(), &to_duplicate, &new_descs)?
206 + duplicate_commits_onto_parents(tx.repo_mut(), &to_duplicate)?
(cli
and lib
are two different workspace members)
However, this does actually have three arguments in the cited file -- the previous revision that I changed my working copy to had two arguments, but rustc doesn't register that for some reason:
pub fn duplicate_commits_onto_parents(
mut_repo: &mut MutableRepo,
target_commits: &[CommitId],
target_descriptions: &HashMap<CommitId, String>,
) -> BackendResult<DuplicateCommitsStats>
The mtime of the file in question is sane:
-rw-r--r-- 1 winter staff 44K Apr 12 23:25 /Users/winter/src/jj/lib/src/rewrite.rs
The only way to work around this is to nuke target/
, which is obviously quite annoying.
Meta
rustc --version --verbose
:
rustc 1.88.0-nightly (934880f58 2025-04-09)
binary: rustc
commit-hash: 934880f586f6ac1f952c7090e2a943fcd7775e7b
commit-date: 2025-04-09
host: aarch64-apple-darwin
release: 1.88.0-nightly
LLVM version: 20.1.2
Backtrace
n/a, no backtrace was printed
Note: incremental compilation is disabled with CARGO_INCREMENTAL=0
.